首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在conf/elasticsearch.yml中定义datacenter.group以便运行Elassandra多数据中心?

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

Stack Overflow用户
提问于 2020-08-05 17:09:27
回答 1查看 56关注 0票数 1

我有2DC

代码语言:javascript
复制
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。

阻止我将Elassandra从5.5重新安装到6.2的原因是,我在该节点上有一个重要的数据。因此,我带来了多数据中心解决方案。

我之前从Strapdata的人那里得到的解决方案是

代码语言:javascript
复制
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.

我在互联网上找遍了,没有提到elasticsearch.yaml中的datacenter.group (http://doc.elassandra.io/en/latest/configuration.html#multi-datacenter-configuration)

现在我不知道该如何处理datacenter.group one

请帮帮忙谢谢

EN

回答 1

Stack Overflow用户

发布于 2020-08-06 12:00:59

对于那些可能遇到这个问题的人来说,

几个小时后,我想出了如何定义datacenter.group

只需在elasticsearch.yml文件的底部添加datacenter.group:<your desired name>即可。

然后重启Cassandra服务

代码语言:javascript
复制
systemctl restart cassandra

你可以走了!所有数据将自动传输到新节点。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63261884

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档