Cassandra通过Hector API连接错误

时间:2012-06-19 09:43:27

标签: cassandra hector

我的计算机上安装了Cassandra 1.1.1,我正在尝试通过Hector API连接到它。我正在使用DeveloperStation.ORG中的示例。我已经启动了服务器,我也通过cli创建了所需的密钥空间和列族。现在当我尝试执行程序插入数据时,我得到以下错误。

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:unconfigured columnfamily authCollection)
at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:42)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:95)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:88)

Error encountered while inserting data!!
at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:101)
at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:224)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(KeyspaceServiceImpl.java:129)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.batchMutate(KeyspaceServiceImpl.java:100)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.batchMutate(KeyspaceServiceImpl.java:106)
at me.prettyprint.cassandra.model.MutatorImpl$3.doInKeyspace(MutatorImpl.java:219)
at me.prettyprint.cassandra.model.MutatorImpl$3.doInKeyspace(MutatorImpl.java:216)
at me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(KeyspaceOperationCallback.java:20)
at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(ExecutingKeyspace.java:85)
at me.prettyprint.cassandra.model.MutatorImpl.execute(MutatorImpl.java:216)
at me.prettyprint.cassandra.model.MutatorImpl.insert(MutatorImpl.java:55)
at com.examples.cassandra.CassandraExample.insertData(CassandraExample.java:31)
at com.examples.cassandra.CassandraExample.main(CassandraExample.java:131)

Caused by: InvalidRequestException(why:unconfigured columnfamily authCollection)
at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:16477)
at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:916)
at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:890)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:93)
... 14 more

1 个答案:

答案 0 :(得分:0)

“unconfigured columnfamily X”表示您需要在尝试插入之前创建columnfamily X.