2015-11-04 66 views
5

我目前的光泽配置设置是这样的:Elasticsearch:HOW-TO删除(群)设置

{ 
    "persistent": { 
    "indices": { 
     "store": { 
     "throttle": { 
      "type": "none", 
      "max_bytes_per_sec": "150mb" 
     } 
     } 
    } 
    }, 
    "transient": {} 
} 

,我想知道我怎么能删除“max_bytes_per_sec”的设置的一部分。

可以请你给这个建议吗?

+0

我不认为你可以将其删除。如果你有''indices.store.throttle.type“:”none“'我认为'max_bytes_per_sec'被忽略。 –

+0

您是否曾经手动更改过它? – piyushGoyal

+0

谢谢安德烈。这是事实,这是被忽略的。但我只想知道如何删除它.. – iamsterdam

回答

4

好的。我发现如何删除一个永久设置: 你去主节点的定义数据路径, 更具体地说,nodes/0/_state(在我的情况下) ,你删除全局状态文件。然后重新启动elasticsearch。

+0

永远不要访问数据文件夹。 正确的回复是上面的回复,参考https://www.elastic.co/guide/en/elasticsearch/reference/5.5/cluster-update-settings.html – lucabelluccini

1

下面是从ES文档的例子:

PUT/_cluster /设置{ “持久”:{ “indices.store.throttle.max_bytes_per_sec”: “100MB” }}

PUT/_cluster /设置{ “瞬时”:{ “indices.store.throttle.type”:“none” }}

+0

:我知道,因为我做到了。问题是如何删除它? – iamsterdam

+0

你不能删除它。我的意思是你可以使用相同的api恢复到默认值 – piyushGoyal

1
Resetting persistent or transient settings can be done by assigning a null value. 

Refer: https://www.elastic.co/guide/en/elasticsearch/reference/5.5/cluster-update-settings.html 

in your case it would be 

PUT /_cluster/settings 
{ 
    "persistent" : { 
     "indices.store.throttle.max_bytes_per_sec" : null 
    } 
}