美文网首页
es处理yellow状态的异常分片

es处理yellow状态的异常分片

作者: 大鹏一怒乘风起 | 来源:发表于2022-10-09 09:40 被阅读0次

获取异常分片的索引列表:
curl -s -XGET localhost:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason| grep UNASSIGNED|awk '{print $1}' >1

更改异常分片数量,让集群状态green
cat 1|while read line;do curl -XPUT -H 'Content-Type: application/json' localhost:9200/$line/_settings -d '{"number_of_replicas": 0}';done;

相关文章

网友评论

      本文标题:es处理yellow状态的异常分片

      本文链接:https://www.haomeiwen.com/subject/fljgartx.html