首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Elastic search - elasticsearch.yml中未配置节点属性如果没有节点属性,则无法控制分片分配

Elastic search - elasticsearch.yml中未配置节点属性如果没有节点属性,则无法控制分片分配
EN

Stack Overflow用户
提问于 2020-02-05 00:14:02
回答 1查看 2.3K关注 0票数 1

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

代码语言:javascript
复制
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中,但仍然得到相同的错误。我遗漏了什么?

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

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-02-05 02:11:54

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

代码语言:javascript
复制
node.attr.[some attribute]: value

喜欢

代码语言:javascript
复制
node.attr.box_type: hot

稍后,您可以更改索引设置,使其位于如此冷热的节点上:

代码语言:javascript
复制
PUT /logs_2016-12-26
{
  "settings": {
    "index.routing.allocation.require.box_type": "hot"
  }
}

box_type在这里是一个任意的属性。

有关更多详细信息,请查看herehere

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

https://stackoverflow.com/questions/60061442

复制
相关文章

相似问题

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