Zen
Zen

Reputation: 43

Not able to load data files in Cassandra using sstableloader

I have following set of sstable files in cassandra version 1.0.12

column_data-hd-\<some-number\>-Data.db
column_data-hd-\<some-number\>-Digest.sha1
column_data-hd-\<some-number\>-Index.db
column_data-hd-\<some-number\>-Filter.db
column_data-hd-\<some-number\>-Statistics.db

I am trying to load these sstable files into cassandra version 1.1.0 using sstableloader shows me below error.

Skipping file column_data-hd--Data.db: column family keyspace-name.hd does't exists Here there is no file like keyspace-name.hd

Does not work with nodetool upgradesstables as well

sstableloader -d \[hostname\] \[dir_keyspace/columnFamily\]

Here I have created keyspace and columnfamily

Same does not work with cassandra version 1.2.9

Loading these into diff cluster of cassandra version 1.0.12 using nodetool refresh works fine

Steps I follow

  1. Create keyspace and column family
  2. Copy sstable files under /keyspace/columnfamily
  3. run sstableload / nodetool upgradesstables

Upvotes: 0

Views: 154

Answers (2)

Zen
Zen

Reputation: 43

It worked on ver 1.1.0 by appending all files with keyspace name like below

keyspaceName-column_data-hd-<some-number>-Data.db

Upvotes: 0

Andrew
Andrew

Reputation: 27294

On the more recent versions of SSTableLoader, when using the command the name of the folder you are loading from is used by it to determine the keyspace / tablename. If the older version of the loader followed that same pattern then the name of the folder structure above the file matters, e.g. it should be something like:

/some/path/of/yours/keyspace/table/<your files>

Of course, we also strongly recommend that you upgrade as soon as possible, as far as possible. It might be that you are using thrift and can not get to Cassandra 4, but at least get to the latest 3.11 as soon as possible.

Upvotes: 0

Related Questions