[ 
https://issues.apache.org/jira/browse/CASSANDRA-2760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Brown updated CASSANDRA-2760:
-----------------------------------

    Attachment: 0001-cassandra-2760.patch

Instead of trying to process an unknown column family (and exiting with an 
exception), load the Descriptor at the top of the export process and check to 
see if the keyspace/column family exists inside the current cassandra setup. If 
not, print a warning message and exit.
                
> NPE in sstable2json 
> --------------------
>
>                 Key: CASSANDRA-2760
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2760
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 0.8.0
>            Reporter: Danny Wang
>         Attachments: 0001-cassandra-2760.patch, User-g-4-Data.db
>
>
> ./sstable2json 
> /var/lib/cassandra/data/test/snapshots/1307649033076/User-g-4-Data.db 
> {
> Exception in thread "main" java.lang.NullPointerException
>         at org.apache.cassandra.db.ColumnFamily.<init>(ColumnFamily.java:82)
>         at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:70)
>         at 
> org.apache.cassandra.io.sstable.SSTableIdentityIterator.<init>(SSTableIdentityIterator.java:142)
>         at 
> org.apache.cassandra.io.sstable.SSTableIdentityIterator.<init>(SSTableIdentityIterator.java:90)
>         at 
> org.apache.cassandra.io.sstable.SSTableIdentityIterator.<init>(SSTableIdentityIterator.java:74)
>         at 
> org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:179)
>         at 
> org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:144)
>         at 
> org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:136)
>         at 
> org.apache.cassandra.tools.SSTableExport.export(SSTableExport.java:313)
>         at 
> org.apache.cassandra.tools.SSTableExport.export(SSTableExport.java:344)
>         at 
> org.apache.cassandra.tools.SSTableExport.export(SSTableExport.java:357)
>         at 
> org.apache.cassandra.tools.SSTableExport.main(SSTableExport.java:415)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to