栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Elasticsearch 超出分片1000,无法写入

Elasticsearch 超出分片1000,无法写入

现象: es 日志出现:

[2021-12-15T07:45:10,517][WARN ][o.e.x.m.e.l.LocalExporter] [node-1] unexpected error while indexing monitoring document
org.elasticsearch.xpack.monitoring.exporter.ExportException: org.elasticsearch.common.ValidationException: Validation Failed: 1: this action would add [1] total shards, but this cluster currently has [1053]/[1000] maximum shards open;

显示分片打开超过1000 的分片

分析: Elasticsearch 7.x 默认 cluster.max_shards_per_node 为 1000

操作:

调整分片为每个节点的分片为10000

#通过API 进行修改

PUT /_cluster/settings
    {
      "persistent": {
        "cluster": {
          "max_shards_per_node":10000
        }
      }
    }

transient 临时
persistent 永久

总结:

        对于一些ES 只有一台主机,最好开始根据业务情况进行调整每个节点的分片数。在配置文件配置为

cluster.max_shards_per_node: 10000  

启动后验证一下:

GET /_cluster/settings

操作后都需要验证一下。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/689833.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号