Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 cassandra 有一个反列系列。当我尝试从 CQL 查看数据时,即使列族中有数据,我也会收到错误消息。
SELECT * from userstats;
生成以下错误:
'int' 对象没有属性 'replace'
我可以确认数据在列族中并且工作正常,因为我可以使用 Datastax Opscenter 数据浏览器查看数据。
听起来您使用的是旧版本的 cqlsh。升级它(只需bin/cqlsh从 Cassandra 1.1 分支头复制文件以及pylib目录下的所有内容)应该可以解决这个问题。
bin/cqlsh
pylib
如果没有,运行 cqlsh--debug将有助于诊断问题。
--debug
我是位运算的初学者(在 C 方面也不是很有经验),我遇到了以下表达式:
x |= (1<<y)
起初我以为它的意思是“x 等于 x 或 y 左移一位”,但后来我意识到这将是:
x |= (y<<1)