| 接口 | PUT /_cluster/settings |
|---|---|
| 常用项 | cluster.routing.allocation.enable、cluster.routing.allocation.disk.threshold_enabled、cluster.routing.allocation.exclude._name、indices.recovery.max_bytes_per_sec |
| 清理方式 | 把值设为 null 恢复默认 |
示例
示例
PUT /_cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "all",
"indices.recovery.max_bytes_per_sec": "200mb"
}
}
GET /_cluster/settings?include_defaults=true&flat_settings=true维护/重启大节点前把 allocation.enable 设为 none 暂停分片移动,恢复后再设回 all,可减少无谓的重新分配。