卡桑德拉不为人知的例外

时间:2010-03-06 16:05:38

标签: cassandra

我设法为Thrift Cassandra设置了Thrift + LazyBoy和Python包装器,并且我遵循了LazyBoy Wiki中提到的example。那个例子我收到一个例外的错误。

cassandra.ttypes.InvalidRequestException: InvalidRequestException(why='Keyspace
UserData does not exist in this schema.')

这是例外。我期待着帮助。

感谢。

2 个答案:

答案 0 :(得分:6)

确保配置文件(conf / storage-conf.xml)中存在键空间'UserData'

E.g

<Keyspaces>
    <Keyspace Name="UserData">
     ....
</Keyspaces>

答案 1 :(得分:2)

对于那些刚从Cassandra / Pycassa开始的人,那么也许你已经在this tutorial工作了,而你却陷入了困境

col_fam = pycassa.ColumnFamily(pool, 'Standard1')

错误看起来像

pycassa.cassandra.ttypes.InvalidRequestException: InvalidRequestException(why='Keyspace Keyspace1 does not exist')

要解决此问题,请启动Cassandra

bin/cassandra -f 

然后在另一个终端窗口中使用

加载示例模式
bin/cassandra-cli -host localhost --file conf/schema-sample.txt

然后你应该通过教程中的那一行。