gpt4 book ai didi

elasticsearch - 如何在conf/elasticsearch.yml中定义datacenter.group以便运行Elassandra多数据中心?

转载 作者:行者123 更新时间:2023-12-02 23:43:25 25 4
gpt4 key购买 nike

我有2DC

DC1
x.x.x.1 running Elassandra 6.2.3 (seed)
x.x.x.2 running Elassandra 5.5.0 (seed)

DC2
x.x.x.3 running Elassandra 6.2.3 (seed)
实际上,我不想创建一个多数据中心,起初我在DC1中只有两个节点,但是由于最低版本允许Elassandra之间的连接为5.6,所以它们无法相互连接。
使我无法从5.5重新安装Elassandra到6.2的原因是,我在该节点上拥有重要的数据。因此,我提出了多数据中心解决方案。
我以前从Strapdata的家伙那里得到的解决方案是
1.Create a new Cassandra Datacenter DC2 running version 6.2.3, with a dedicated datacenter group (see https://elassandra.readthedocs.io/en/latest/configuration.html#multi-datacenter-configuration)

2. Re-create your indices in DC2, there is few differences in the elasticsearch mapping between version 5.5 and 6.2, so you have to deal with that manually.
If you have a lot of data to re-index, you can stop the single-thread index build with a nodetool stop -id <compaction_id>, and restart it in multi-threads, see https://elassandra.readthedocs.io/en/latest/operations.html?highlight=--num-threads#create-delete-and-rebuild-index

3. Test your application on DC2 (warning, there is breaking changes in the Elasticsearch API when upgrading)

4. Remove old DCs running version 5.5 when everything is ok on DC2.
我已经搜索了整个Internet,在elasticsearch.yaml( http://doc.elassandra.io/en/latest/configuration.html#multi-datacenter-configuration)中没有提到datacenter.group
现在我不知道该如何使用datacenter.group one
请帮忙
谢谢

最佳答案

对于可能遇到这个问题的人,
几个小时后,我想出了如何定义datacenter.group
只需在elasticsearch.yml文件底部添加datacenter.group:<your desired name>
然后重新启动Cassandra服务

systemctl restart cassandra
你很好!所有数据将自动传输到新节点。

关于elasticsearch - 如何在conf/elasticsearch.yml中定义datacenter.group以便运行Elassandra多数据中心?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63261884/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com