debugging - Cassandra sstable2json doesn't works -


i'm try export data cassandra using sstable2json when try run command

sstable2json /var/lib/cassandra/data/s2b_development/users-g-110-data.db

an error occurs

log4j:warn no appenders found logger (org.apache.cassandra.config.databasedescriptor). log4j:warn please initialize log4j system properly. log4j:warn see http://logging.apache.org/log4j/1.2/faq.html#noconfig more info. no non-system tables defined exception in thread "main" org.apache.cassandra.config.configurationexception: no non-system tables defined @ org.apache.cassandra.tools.sstableexport.main(sstableexport.java:414)

cassandra version: 0.8

example of how output sstable2json

for benefit of other developers:

1. start cassandra
2. fire cqlsh
3. create keyspace:

create keyspace test replication =      {'class': 'simplestrategy', 'replication_factor': 1}; 

4. create cf

create table test.test2 (   key varchar primary key,    string varchar,    number int,    flag boolean ); 

5. populate cf key (or lots of keys...)

insert test.test2 (key, string, number, flag) values ('first_key', 'varchuuur', 312, false); 

6. flush data (so gets saved memtable sstable)
7. stop cassandra
8. run sstable2json

./bin/sstable2json /var/lib/cassandra/data/test/test2/test-test2-jb-1-data.db; 

output:

[   {     "key": "66697273745f6b6579","columns":      [       ["","",1378042590383000],        ["flag","true",1378042590383000], ["number","312",1378042590383000],        ["string","varchuuur",1378042590383000]     ]   } ] 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -