Elasticsearch8.17 集群重启操作
一、全集群重启步骤
1. 禁用分片分配
在关闭数据节点前,需禁用副本分片的分配,避免不必要的 I/O 操作。通过以下命令将分片分配限制为仅主分片:
resp = client.cluster.put_settings(
persistent={
"cluster.routing.allocation.enable": "primaries"
}
)
print(resp)
response = client.cluster.put_settings(
body: {
persistent: {
'cluster.routing.allocation.enable' => 'primaries'
}
}
)
puts response
const response = await client.cluster.putSettings({
persistent: {
"cluster.routing.allocation.enable": "primarie
原文地址:https://blog.csdn.net/u012743772/article/details/146382763
免责声明:本站文章内容转载自网络资源,如侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!