我们有两个节点的cassandra集群,我们想扩展到四个。我们遵循此处描述的过程:http : //www.datastax.com/documentation/cassandra/1.2/cassandra/operations/ops_add_node_to_cluster_t.html
但是,在添加了两个以上的节点后(按照文档中的建议,同时添加了2分钟的间隔),我们遇到了一些数据丢失的情况。在某些列族中,缺少元素。
这是nodetool netstats
:
[centos@ip-10-11-11-187 ~]$ nodetool status
Datacenter: us-west-2
=====================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 10.11.11.187 5.63 MB 256 ? 0e596912-d649-4eed-82a4-df800c422634 2c
UN 10.11.1.104 748.79 MB 256 ? d8b96739-0858-4926-9eb2-27c96ca0a1c4 2c
UN 10.11.11.24 7.11 MB 256 ? e3e76dcf-2c39-42e5-a34e-9e986d4a9f7c 2c
UN 10.11.1.231 878.91 MB 256 ? cc1b5cfd-c9d0-4ca9-bbb1-bce4b2deffc1 2c
Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless
我不太了解“注释”是否正确。
添加节点时,我们将两个第一台服务器(群集中已经可用)放置在第一个添加节点的配置种子中。对于第二个添加的节点,我们也将新添加的节点也放入种子中。
我们正在使用EC2Snitch
,并且listen_address
已在每台服务器上设置为上述地址。
我们还没有进行清理,但是我们尝试进行修复,并且写到在我们的键帽中什么也不能修复。
这是创建集群的方式:
CREATE KEYSPACE keyspace_name WITH replication = {'class': 'NetworkTopologyStrategy', 'us-west-2': '1'} AND durable_writes = true;
以及我们所有表的选项:
CREATE TABLE keyspace_name."CFName" (
// ...
) WITH bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
AND comment = ''
AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
如果我停用新节点,数据将重新出现。
编辑:阅读文档时实际上是一个错误...一位同事确实将auto_bootstrap设置为false而不是将其设置为true ...
nodetool rebuild
使用auto_bootstrap添加新节点后,应在新节点上执行:false
http://www.datastax.com/documentation/cassandra/2.0/cassandra/tools/toolsRebuild.html
高温超导
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句