Cassandra插入错误 [英] Cassandra Insertion Error
问题描述
我有一个4节点Cassandra集群,有2个Cassandra节点和2个brisk节点[cassandra + TT]。 Brisk测试版2
I have a 4 Node Cassandra cluster with 2 Cassandra nodes and 2 brisk nodes[cassandra+TT]. Brisk beta 2
我使用cassandra-cli插入创建和更新列系列
I used cassandra-cli to insert create and update column families
我的插入和投影总是失败。例如
My insertions and projections are are always getting failed. For example
计数器列系列
[default@StatsKeySpace] create column family Impressions with comparator=UTF8Type and default_validation_class=CounterColumnType and key_validation_class=UTF8Type;
175d69d0-eb6f-11e0-0000-93bbb4d362fc
Waiting for schema agreement...
... schemas agree across the cluster
[default@StatsKeySpace] incr Impressions['Test']['impressions'] by 10;
null
[default@StatsKeySpace] incr Impressions['Test']['impressions'] by 1;
null
[default@StatsKeySpace] get Impressions['Test']['impressions'];
null
[default@StatsKeySpace] list Impressions;
Using default limit of 100
null
标准列族
[default@StatsKeySpace] set TestColumnFamily['Test']['tamil']='hai';
null
集群中所有节点都处于活动状态
All the nodes are alive in the cluster
这是我的键空间defn
This is my keyspace defn
Keyspace: StatsKeySpace:
Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
Durable Writes: true
Options: [replication_factor:1]
$ b b
我试过cassandra-cli与调试模式我发现这个错误
I tried cassandra-cli with debug mode I found this error
[default@unknown] use StatsKeySpace;
Authenticated to keyspace: StatsKeySpace
[default@StatsKeySpace] incr Impressions['tamil']['count'] by 1;
null
java.lang.RuntimeException
at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:297)
at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:217)
at org.apache.cassandra.cli.CliMain.main(CliMain.java:345)
两个列族都有replicate_on_write false
感谢您提前寻求帮助
Both the column families has replicate_on_write false Thanks for help in advance
问候,
泰米尔
Regards, Tamil
推荐答案
感谢jbellis,
我升级了带有brisk的cassandra版本,并使用debug模式运行cassandra-cli组。
Thanks to jbellis, I upgraded the cassandra version being shipped with brisk and ran cassandra-cli with debug mode set. As jbellis mentioned I got a meaningful exception.
不可用异常 - 没有足够的节点可以满足复制因素。
UnavailableException - Not enough nodes alive for replication factor to be satisfied.
由于brisk使用brisksnitch,它在不同的DC上部署了快节点和cassandra节点。我的4个节点集群之一是Brisk DC的种子。我希望这是为什么我得到这个异常。
Since brisk uses brisksnitch which deploys brisk nodes and cassandra nodes across different DCs. One of my 4 nodes cluster which is the seed for Brisk DC was down. I hope that is why I was getting that exception.
所以,我重新启动了我的整个集群,所有节点升级0.8.6和keyspace与简单的策略,因为我的部署需要只有一个数据中心。
So, I restarted my entire cluster with all nodes upgraded with 0.8.6 and keyspace with simplestrategy since, my deployment need to have only one datacenter.
现在我所有的插入和投影都很好:) Hope brisk b2在所有方面兼容0.8.6
Now all my insertions and projections are doing fine :) Hope brisk b2 is compatible with 0.8.6 in all aspects
尊敬的,
Tamil.s
Regards, Tamil.s
这篇关于Cassandra插入错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!