elasticsearch - 如何在 conf/elasticsearch.yml 中定义 datacenter.group 以运行 Elassandra 多数据中心?
问题描述
我有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,它们无法相互连接。
阻止我将 Elassandra 从 5.5 重新安装到 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.
我在互联网上搜索过,在 elasticsearch.yaml 中没有提到 datacenter.group ( http://doc.elassandra.io/en/latest/configuration.html#multi-datacenter-configuration )
现在我不知道我应该如何处理 datacenter.group one
请帮助谢谢
解决方案
对于可能遇到这个问题的人,
几个小时后,我想出了如何定义 datacenter.group
只需datacenter.group:<your desired name>
在 elasticsearch.yml 文件的底部添加即可。
然后重启 Cassandra 服务
systemctl restart cassandra
你可以走了!所有数据将自动传输到新节点。
推荐阅读
- kubernetes - Kubernetes集群中的DNS解决问题
- amazon-web-services - S3 存储桶:上传的文件大小显示为 0 字节
- java - 在Java中,如何让子类决定使用哪个类型参数类作为被覆盖的方法参数?
- php - 如何在浏览器中列出 postgresql 表数据?
- matlab - 如何在 Matlab 中组合三个单元格数组以制作具有三列的矩阵/表格?
- r - 根据其他列定义轴中断而不保存数据框
- javascript - 如何在 React Native 中动态调用模块
- image - Selenium webdriver:我想点击 https://www.msn.com/en-in/weather/today 底部的“Like 1.3M”图片
- javascript - 遍历对象元素javascript
- elasticsearch - ElasticSearch可以只添加字段索引,不保存原始值,就像lucene Field.Store.NO