Hello.
I know that by issuing this command on my ES node it will set all current replicas to 0 but how about if I want to make it persistent so all of them are 0 from now on..
I did notice that I have 2 other templates in the system called .marvel-es-1 and .marvel-es-data-1 which they have "number_of_replicas": "1"
I shouldn't worry about that because my new default template will take precedence?
ES created new indices this morning with all of them as replicas = 0 .. good but my .marvel-es-1-2016.08.20 was created with a second replica and has one of them assigned to unassigned (because I only have 1 ES node in my Dev box).
Can I update an existing template but only change 1 setting?..
I think this one needs changing:
.marvel-es-1
.marvel-es-1-*
"number_of_replicas": "1"
Based on https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html#multiple-templates - it would suggest that if you put together a zeroreplicas template that looked like {"template":"*", "order":1, "settings":{"number_of_replicas":0}}
You would be placing the zeroreplicas template at a higher priority than the marvel templates (which are at order 0), and thus override any conflicting settings in lower priority templates.
Hi Josh.
I created a zeroreplicas template the other day and that seems to have fixed all my other indices so they get created with no replicas except for the marvel ones (maybe becuase they have a specific tempalte?)... Please see a couple of threads up which is an extract of my templates in pastebin.
Yep, key difference in my suggestion vs what you had posted is that yours didn't specify the "order" parameter, so it used the default value of 0. If you explicitly set it to 1, you should override the replica parameter in the marvel template and set it to 0.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.