Question About Settings/Config

OK from reading here
https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/node/NodeBuilder.java

It would seem that I can hardcode properties in Java then have them
overridden by the yml file on the classpath. I have seen this work.
What about the Java System Properties. I see I can prefix them with
an es.

Do these supersede even the YML? What is the expected order/hierarchy here?

Also below is how I am initing all this. Does this look correct for
what I am after? Thoughts? Improvements?
_nodeInstance = nodeBuilder().
settings(ImmutableSettings.settingsBuilder().
put("number_of_shards", 5).
put("number_of_replicas", 1).
put("gateway.type", "local").
put("cluster.name", "dotCMSContentStore").
put("path.data", "dotCMS/dotsecure/esdata").
put("name", node_id).
build()).
build().
start();

Thanks,
Jason Tesser
dotCMS Director, Support Services
1-305-858-1422

Yes, system properties will be preferred over the explicit ones set in the
"yml" configuration. You can control what gets loaded when and how by
constructing your own settings object, and passing it to the NodeBuilder.

On Thu, Nov 17, 2011 at 3:18 PM, Jason Tesser jasontesser@gmail.com wrote:

OK from reading here

https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/node/NodeBuilder.java

It would seem that I can hardcode properties in Java then have them
overridden by the yml file on the classpath. I have seen this work.
What about the Java System Properties. I see I can prefix them with
an es.

Do these supersede even the YML? What is the expected order/hierarchy
here?

Also below is how I am initing all this. Does this look correct for
what I am after? Thoughts? Improvements?
_nodeInstance = nodeBuilder().
settings(ImmutableSettings.settingsBuilder().
put("number_of_shards", 5).
put("number_of_replicas", 1).
put("gateway.type", "local").
put("cluster.name", "dotCMSContentStore").
put("path.data", "dotCMS/dotsecure/esdata").
put("name", node_id).
build()).
build().
start();

Thanks,
Jason Tesser
dotCMS Director, Support Services
1-305-858-1422