简体   繁体   English

无法在BAM中使用cql3查询某些cassandra数据存储区

[英]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. 我正在BAM中尝试实时流量示例,并发现消息存储在cassandra密钥空间中,其列族为:bam_message_store。
However, with cql3, I can't browse the data, can you figure out why? 但是,使用cql3时,我无法浏览数据,您能找出原因吗?

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. 您用来连接到BAM_UTIL_KS键空间的命令可能有问题。 Keyspace name should be wrapped by quotations as follows. 键空间名称应使用引号引起来,如下所示。 Following commands should work. 以下命令应该起作用。

$ ./cqlsh localhost 9160 -u admin -p admin $ ./cqlsh本地主机9160 -u admin -p admin

Connected to Test Cluster at localhost:9160. 在本地主机:9160连接到测试集群。 [cqlsh 3.1.2 | [cqlsh 3.1.2 | Cassandra 1.2.10.1 | 卡桑德拉1.2.10.1 | CQL spec 3.0.0 | CQL规范3.0.0 | Thrift protocol 19.36.0] Use HELP for help. 节俭协议19.36.0]请使用HELP寻求帮助。

cqlsh> use "BAM_UTIL_KS"; cqlsh>使用“ BAM_UTIL_KS”;

cqlsh:BAM_UTIL_KS> select * from bam_message_store; cqlsh:BAM_UTIL_KS>选择* 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;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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