gpt4 book ai didi

elasticsearch - Elasticsearch -在elasticsearch.yml中未配置节点属性如果没有节点属性,您将无法控制分片分配

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

在Kibana中设置索引冷/热阶段时,会出现以下错误:

No node attributes configured in elasticsearch.yml
You can't control shard allocation without node attributes.

Learn about shard allocation. https://www.elastic.co/guide/en/elasticsearch/reference/7.3/shards-allocation.html

我已在所有3个节点上将碎片分配配置(在上面的链接中详细介绍)添加到elasticsearch.yml,但仍然收到相同的错误。我想念什么?
#SHARD ALLOCATION

cluster.routing.allocation.enable: All
cluster.routing.allocation.node_concurrent_incoming_recoveries: 2
cluster.routing.allocation.node_concurrent_outgoing_recoveries: 2
cluster.routing.allocation.node_concurrent_recoveries: 2
cluster.routing.allocation.node_initial_primaries_recoveries: 4
cluster.routing.allocation.same_shard.host: false

#SHARD BALANCING

cluster.routing.rebalance.enable: all
cluster.routing.allocation.allow_rebalance: indices_all_active
cluster.routing.allocation.cluster_concurrent_rebalance: 2
cluster.routing.allocation.balance.shard: 0.45f
cluster.routing.allocation.balance.index: 0.55f
cluster.routing.allocation.balance.threshold: 1.0f

#DISK SPACE MANAGEMENT

cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.low: 85%
cluster.routing.allocation.disk.watermark.high: 90%
cluster.routing.allocation.disk.watermark.flood_stage: 95%
cluster.info.update.interval: 240s
cluster.routing.allocation.disk.include_relocations: true

最佳答案

要定义节点属性,应添加如下设置:

node.attr.[some attribute]: value

喜欢
node.attr.box_type: hot

然后您可以更改索引设置,使其位于非常冷的热节点上:
PUT /logs_2016-12-26
{
"settings": {
"index.routing.allocation.require.box_type": "hot"
}
}
box_type在这里是任意属性。

有关更多详细信息,您可以检查 herehere

关于elasticsearch - Elasticsearch -在elasticsearch.yml中未配置节点属性如果没有节点属性,您将无法控制分片分配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60061442/

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