简体   繁体   English

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

[英]How to define datacenter.group in conf/elasticsearch.yml in order to run Elassandra multi data center?

I've 2DC我有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)

Actually I didn't want to create a multi data center, at first I have only two nodes in DC1 but they're unable to connect with each other due to minimum version that allowed connectivity among Elassandra is 5.6.实际上我不想创建一个多数据中心,起初我在 DC1 中只有两个节点,但由于允许 Elassandra 之间连接的最低版本是 5.6,它们无法相互连接。

The thing that stop me from re-install Elassandra from 5.5 to 6.2 is I have an important data on that node.阻止我将 Elassandra 从 5.5 重新安装到 6.2 的原因是我在该节点上有重要数据。 So I came with the multi data center solution.所以我提出了多数据中心解决方案。

The solution I've got from Strapdata's guy previously is我以前从 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.

I've search all over the internet, there're no mentioned about the datacenter.group in elasticsearch.yaml ( http://doc.elassandra.io/en/latest/configuration.html#multi-datacenter-configuration )我在整个互联网上搜索过,在 elasticsearch.yaml ( http )中没有提到 datacenter.group//doc.elassandra-multidata-center/en#configuration.html/configuration.html/

Now I've no idea what should I do with the datacenter.group one现在我不知道我应该如何处理 datacenter.group one

please help Thanks请帮助谢谢

For guys that might came across the issue,对于可能遇到这个问题的人,

after a couple of hours, I've figured out how to define the datacenter.group几个小时后,我想出了如何定义 datacenter.group

just simply add datacenter.group:<your desired name> at the bottom of elasticsearch.yml file.只需在 elasticsearch.yml 文件的底部添加datacenter.group:<your desired name>

Then restart Cassandra service然后重启Cassandra服务

systemctl restart cassandra

You're good to go.你对 go 很好。 all the data will automatically transfer to the new node.所有数据将自动传输到新节点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM