You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Alex Zarutin (JIRA)" <ji...@apache.org> on 2013/06/18 05:16:21 UTC

[jira] [Created] (CASSANDRA-5653) NoSuchElementException using sstableloader when extra files (not Index/Data) exist under keyspace/CF of the restored folder

Alex Zarutin created CASSANDRA-5653:
---------------------------------------

             Summary: NoSuchElementException using sstableloader when extra files (not Index/Data) exist under keyspace/CF of the restored folder
                 Key: CASSANDRA-5653
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5653
             Project: Cassandra
          Issue Type: Bug
          Components: Tools
         Environment: MacOs
            Reporter: Alex Zarutin


Error, I received during the "loading" data back into Cassandra using sstableloader. The content of Keyspace1/Standard1/ is what was copied in full from data/Keyspace1/Standard1/.

If Stabdard, json, etc files (except of *Index* and *Data*) are removed, problem is gone. 

According documentation, (page 191):
http://www.datastax.com/doc-source/pdf/cassandra12.pdf

where <dir_name> is the directory containing the SStables. Only the -Data and -Index components are required; -Statistics and -Filter are ignored.

It seems that extra files need to be removed in order to be "safe" during this procedure running. 

Steps to repro:
1. Create tons of the files under ..../data/Keyspace1/Standard1
2. ccm stop
3. Move content of /data/Keyspace1/Standard1 under ~/.ccm/data-1.2.6
4.
$> ./sstableloader -d 127.0.0.1  -v -debug ~/.ccm/data-1.2.6/Keyspace1/Standard1/
null
java.util.NoSuchElementException
    at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
    at org.apache.cassandra.io.sstable.Descriptor.fromFilename(Descriptor.java:269)
    at org.apache.cassandra.io.sstable.Component.fromFilename(Component.java:122)
    at org.apache.cassandra.io.sstable.SSTable.tryComponentFromFilename(SSTable.java:194)
    at org.apache.cassandra.io.sstable.SSTableLoader$1.accept(SSTableLoader.java:71)
    at java.io.File.list(File.java:1010)
    at org.apache.cassandra.io.sstable.SSTableLoader.openSSTables(SSTableLoader.java:67)
    at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:119)
    at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:67)


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira