无法在cassandra创建列族

时间:2012-06-11 02:10:29

标签: database cassandra

我创建了一个cassandra的多节点集群:node0和node1(cassandra版本1.1.1),然后我使用cassandra-cli连接到node0并创建一个列族。 node0的信息没问题,但它在node1抛出异常,如下所示:


    ERROR 18:22:48,486 Exception in thread Thread[MigrationStage:1,5,main]
    org.apache.cassandra.db.marshal.MarshalException: invalid UTF8 bytes 4fd5c745
        at org.apache.cassandra.db.marshal.UTF8Type.getString(UTF8Type.java:56)
        at org.apache.cassandra.cql3.ColumnIdentifier.(ColumnIdentifier.java:47)
        at org.apache.cassandra.cql3.CFDefinition.getKeyId(CFDefinition.java:125)
        at org.apache.cassandra.cql3.CFDefinition.(CFDefinition.java:59)
        at org.apache.cassandra.config.CFMetaData.updateCfDef(CFMetaData.java:1303)
        at org.apache.cassandra.config.CFMetaData.keyAlias(CFMetaData.java:224)
        at org.apache.cassandra.config.CFMetaData.fromSchemaNoColumns(CFMetaData.java:1187)
        at org.apache.cassandra.config.CFMetaData.fromSchema(CFMetaData.java:1215)
        at org.apache.cassandra.config.KSMetaData.deserializeColumnFamilies(KSMetaData.java:291)
        at org.apache.cassandra.db.DefsTable.mergeColumnFamilies(DefsTable.java:396)
        at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:271)
        at org.apache.cassandra.db.DefsTable.mergeRemoteSchema(DefsTable.java:249)
        at org.apache.cassandra.db.DefinitionsUpdateVerbHandler$1.runMayThrow(DefinitionsUpdateVerbHandler.java:48)
        at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

然后我将数据存储到node0的列族中,我可以在node0获取数据,而node1表示未找到列族。在重新启动node1之后,我可以在node1获取数据,如node0。

如何解决此问题?

1 个答案:

答案 0 :(得分:0)

这是即将发布的1.1.2版本中修复的错误:https://issues.apache.org/jira/browse/CASSANDRA-4307。如果要测试修复,可以从Apache的git仓库中提取trunk分支。