Pergunta

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> 
Foi útil?

Solução

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;

Outras dicas

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;

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top