我們從cassandra集羣獲得了奇怪的行爲(1.0.10)。在沒有複製因子的情況下在cassandra *中設置密鑰空間
我們正在運行一個3節點的集羣。
[[email protected]] create keyspace foo;
ae639ba0-d4b8-11e1-0000-424d3d43a8df
Waiting for schema agreement...
Warning: unreachable nodes 10.227.65.172, 10.51.62.63... schemas agree across the cluster
[[email protected]] use foo;
Authenticated to keyspace: foo
[[email protected]] create column family User with comparator = UTF8Type;
b4608180-d4b8-11e1-0000-424d3d43a8df
Waiting for schema agreement...
Warning: unreachable nodes 10.227.65.172, 10.51.62.63... schemas agree across the cluster
[[email protected]] update column family User with
... column_metadata =
... [
... {column_name: first, validation_class: UTF8Type},
... {column_name: last, validation_class: UTF8Type},
... {column_name: age, validation_class: UTF8Type, index_type: KEYS}
... ];
b70562c0-d4b8-11e1-0000-424d3d43a8df
Waiting for schema agreement...
Warning: unreachable nodes 10.227.65.172, 10.51.62.63... schemas agree across the cluster
[[email protected]] set User['jsmith']['first'] = 'John';
null
UnavailableException()
at org.apache.cassandra.thrift.Cassandra$insert_result.read(Cassandra.java:15206)
at org.apache.cassandra.thrift.Cassandra$Client.recv_insert(Cassandra.java:858)
at org.apache.cassandra.thrift.Cassandra$Client.insert(Cassandra.java:830)
at org.apache.cassandra.cli.CliClient.executeSet(CliClient.java:901)
at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:218)
at org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:220)
at org.apache.cassandra.cli.CliMain.main(CliMain.java:348)
(該帶不能的問題,以達到節點不應該是一個問題,因爲說here:
如果我創建一個密鑰空間沒有設置複製因子,那麼我試圖輸入數據時會出錯)
但是,如果我創建密鑰空間並指定複製因子(1,2或3),那麼它工作正常。
如果在創建羣集時沒有指定複製因子有問題,那麼在創建時不應該拋出異常呢?如果不是在多節點羣集上指定複製因子,那麼預期的行爲是什麼?
它聽起來像一個錯誤。您可以在以下網址提交錯誤報告:https://issues.apache.org/jira/browse/CASSANDRA – psanford 2012-07-23 16:12:11
謝謝 - 錯誤提交:https://issues.apache.org/jira/browse/CASSANDRA-4486 – agentgonzo 2012-08-03 09:30:24