Easysearch、Elasticsearch 还是 Opensearch,是个问题

ES 通过API进行集群设置后,如何取消这种设置

Elasticsearch | 作者 sterne vencel | 发布于2018年06月04日 | 阅读数:2069

通过PAI设置,将一个节点的分片都迁移出去。迁移完毕后,如何取消这个配置啊?请教curl -XPUT http://0.0.0.0:9200/_cluster/settings?pretty -d '{
    "transient":{
         "cluster.routing.allocation.exclude._ip":"10.128.128.137"
    }
}'
已邀请:

yayg2008

赞同来自: sterne vencel

是的,可以通过设置null来取消对应参数。

jianjianhe

赞同来自: sterne vencel

没错,置null就可以了,代码中可以看到没有指定就是返回null的
 if (clusterExcludeFilters != null) {
if (clusterExcludeFilters.match(node.node())) {
return allocation.decision(Decision.NO, NAME, "node matches cluster setting [%s] filters [%s]",
CLUSTER_ROUTING_EXCLUDE_GROUP_PREFIX, clusterExcludeFilters);
}
}
return null;

sterne vencel - 90

赞同来自:

通过设置为null可以取消这个配置。

要回复问题请先登录注册