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

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

    [ https://issues.apache.org/jira/browse/CASSANDRA-5653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13686407#comment-13686407 ] 

Jonathan Ellis commented on CASSANDRA-5653:
-------------------------------------------

It's true that if you have nonsense in the directory then it will choke, where "nonsense" is "files that don't belong to an sstable at all."  That looks like the case here; the exception indicates that it failed after parsing 2 tokens (delimited by "-"), and the minimum number of tokens in an sstable filename is 5.
                
> 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