【发布时间】:2023-04-07 23:48:01
【问题描述】:
我有什么:
- Elasticsearch (7.7.0) 集群(amazon/opendistro-for-elasticsearch:1.8.0 Docker 镜像)
- 一个主节点
- 一个协调节点
- 两个数据节点
node.attr.data=hot - 一个带有
node.attr.data=warm的数据节点
我想要什么:防止分片分配和重定位从热数据节点到热数据节点(以及未来冷数据节点)。
我尝试了什么:
我已经为所有索引模板添加了"index.routing.allocation.require.data": "hot",因此新创建的索引不会分配给除了热数据节点之外的任何节点。这很好用。
无论如何,我不能将分片从热节点重定位到热节点。目前我正在使用"cluster.routing.allocation.exclude._ip" : "warm data node ip" 来防止从热数据节点重新定位到热数据节点。但是我可以将ILM 与此过滤器一起使用吗?
我也试过
PUT _cluster/settings
{
"transient": {
"cluster.routing.allocation.awareness.attributes": ["data"]
}
}
PUT _cluster/settings
{
"transient": {
"cluster.routing.allocation.awareness.force.data.values": ["hot"]
}
}
然后删除"cluster.routing.allocation.exclude._ip" 过滤器。无论如何,分片都从热数据节点重新定位到热数据节点。我错过了什么?
【问题讨论】:
标签: elasticsearch elasticsearch-7 elasticsearch-opendistro