简体   繁体   中英

Cannot query some of the cassandra datastore using cql3 in BAM

I am trying the real time traffic sample in BAM, and find the message is stored into cassandra keyspace, with column family: bam_message_store.
However, with cql3, I can't browse the data, can you figure out why?

cqlsh:bam_util_ks> select * from bam_message_store;  
Bad Request: Keyspace bam_util_ks does not exist  
cqlsh:bam_util_ks> 

Problem could be with the command you are using to connect to BAM_UTIL_KS keyspace. Keyspace name should be wrapped by quotations as follows. Following commands should work.

$ ./cqlsh localhost 9160 -u admin -p admin

Connected to Test Cluster at localhost:9160. [cqlsh 3.1.2 | Cassandra 1.2.10.1 | CQL spec 3.0.0 | Thrift protocol 19.36.0] Use HELP for help.

cqlsh> use "BAM_UTIL_KS";

cqlsh:BAM_UTIL_KS> select * from bam_message_store;

Please try login with keyspace given as parameter in command line parameter, it works.

cqlsh -k BAM_UTIL_KS -u admin -p admin

cqlsh:BAM_UTIL_KS> describe tables;

bam_notification_messages 

cqlsh:BAM_UTIL_KS> select * from bam_notification_messages;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM