2015-11-04 65 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 
    } 
}