【发布时间】:2013-05-06 22:57:48
【问题描述】:
我通过使用 cqlsh 的以下命令创建了一个列族:
create table mystats (key PRIMARY KEY, count counter);
现在,我可以从 cqlsh 增加计数器列,但是当我尝试从 cassandra gem 执行此操作时,如下所示: Are there any Ruby clients for Cassandra with counters and supercolumn?
所以当我使用时:
@stats.add(:mystats, 'randomkey', 1, 'count')
我收到一个错误:
Cassandra::AccessError at /client 列族“mystats”无效
当我进一步研究它时,我发现错误是从 gem 中引发的: 在文件中:https://github.com/twitter/cassandra/blob/master/lib/cassandra/columns.rb
def column_family_property(column_family, key)
cfdef = schema.cf_defs.find {|cfdef| cfdef.name == column_family }
unless cfdef
raise AccessError, "Invalid column family \"#{column_family}\""
end
cfdef.send(key)
end
谁能指出我在这里做错了什么..
【问题讨论】: