您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

弹性重启节点后快速恢复

弹性重启节点后快速恢复

curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.enable": "none"}}'
/etc/init.d/elasticsearch restart
curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.enable": "all"}}'

curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.disable_allocation": true}}'
/etc/init.d/elasticsearch restart
curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.disable_allocation": false}}'

分片保持未分配状态,直到“ cluster.routing.allocation.disable_allocation”:false,然后在刚刚重启的服务器上恢复分片(以关闭前的大小开始)。这非常快。

参考:http ://elasticsearch-users.115913.n3.nabble.com/quick-recovery-after-node-restart- in-elasticsearch-td4033876.html#a4034211

其他 2022/1/1 18:15:27 有656人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶