Titan - Cassandra集群中的架构协议

时间:2016-01-11 13:05:22

标签: scala cassandra titan

我被我与Titan使用的全新Cassandra集群的问题所阻挡。群集有3个节点,当我尝试使用 TitanFactory.open()首次打开图形时出现问题。这是例外:

  

WARN 09:13:44 UnknownColumnFamilyException从socket读取;   关闭org.apache.cassandra.db.UnknownColumnFamilyException:不能   查找cfId 9ca7a420-b843-11e5-8108-d94de8194139的表格。如果一张桌子   刚刚创建,这可能是由于架构不完整   传播。请等待表创建的架构协议。           在org.apache.cassandra.config.CFMetaData $ Serializer.deserialize(CFMetaData.java:1319)   〜[Apache的卡桑德拉-3.0.2.jar:3.0.2]           在org.apache.cassandra.db.ReadCommand $ Serializer.deserialize(ReadCommand.java:586)   〜[Apache的卡桑德拉-3.0.2.jar:3.0.2]           在org.apache.cassandra.db.ReadCommand $ Serializer.deserialize(ReadCommand.java:523)   〜[Apache的卡桑德拉-3.0.2.jar:3.0.2]           在org.apache.cassandra.net.MessageIn.read(MessageIn.java:98)〜[apache-cassandra-3.0.2.jar:3.0.2]           在org.apache.cassandra.net.IncomingTcpConnection.receiveMessage(IncomingTcpConnection.java:199)   〜[Apache的卡桑德拉-3.0.2.jar:3.0.2]           在org.apache.cassandra.net.IncomingTcpConnection.receiveMessages(IncomingTcpConnection.java:176)   〜[Apache的卡桑德拉-3.0.2.jar:3.0.2]           在org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnection.java:92)   〜[Apache的卡桑德拉-3.0.2.jar:3.0.2]

这是我的配置:

def open(keyspace: String = "titan"): BaseConfiguration = {

    var conf = new BaseConfiguration()
    conf.setProperty("storage.backend", "cassandrathrift")
    conf.setProperty("storage.hostname", "XXX.XXX.XXX.XXX")
    conf.setProperty("storage.cassandra.keyspace", keyspace)
    conf.setProperty("storage.batch-loading", true)
    conf.setProperty("storage.buffer-size", 4096)
    conf.setProperty("storage.read-attempts", 300)
    conf.setProperty("storage.write-attempts", 300)
    conf.setProperty("storage.attempt-wait", 200000000)
    conf.setProperty("storage.read-time", 200000000)
    conf.setProperty("storage.lock-wait-time", 200000000)
    conf.setProperty("storage.connection-timeout", 200000000)
    conf.setProperty("storage.read-time", 200000000)
    conf.setProperty("storage.cassandra.replication-factor", 3)
    conf.setProperty("storage.cassandra.frame-size-mb", 1024)
    conf.setProperty("storage.cassandra.thrift.cpool.when-exhausted", "GROW")
    conf.setProperty("storage.cassandra.thrift.cpool.max-active", -1)
    conf.setProperty("storage.cassandra.thrift.cpool.evictor-period", -1)
    conf.setProperty("storage.cassandra.thrift.cpool.min-evictable-idle-time", -1)

    conf.setProperty("ids.block-size", 20000000)

    conf.setProperty("cache.db-cache", true)
    conf.setProperty("cache.db-cache-clean-wait", 20)
    conf.setProperty("cache.db-cache-time", 1800000)
    conf.setProperty("cache.db-cache-size", 0.25)

    conf
}

问题似乎是Cassandra创建表时的架构协议。有一种方法可以在所有节点之间等待架构协议吗?实际上我正在使用Cassandra 3.0.2和Titan 1.0.0。

0 个答案:

没有答案