# Setting unicast mode in embedded node?

**URL:** <https://discuss.elastic.co/t/setting-unicast-mode-in-embedded-node/13202>\
**Category:** Elasticsearch\
**Created:** [August 13, 2013, 6:03pm UTC](https://discuss.elastic.co/t/setting-unicast-mode-in-embedded-node/13202 "2013-08-13T18:03:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinod\_eligeti](https://avatars.discourse-cdn.com/v4/letter/v/c4cdca/32.png) [@vinod\_eligeti](https://discuss.elastic.co/u/vinod_eligeti)\
**Post date:** [August 13, 2013, 6:03pm UTC](https://discuss.elastic.co/t/setting-unicast-mode-in-embedded-node/13202/1 "2013-08-13T18:03:29Z")

</div>

I am created an embedded node with no data and with unicast. Is this  
correct way to do it?

```
    NodeBuilder nb = new NodeBuilder().clusterName("log-store");
    nb.settings().put("node.data", false).
    put("discovery.zen.ping.unicast.hosts", "data-host1")
    .put("discovery.zen.ping.multicast.enabled", false);

```

Node node = nb.client(true).node();

Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 15, 2013, 12:17pm UTC](https://discuss.elastic.co/t/setting-unicast-mode-in-embedded-node/13202/2 "2013-08-15T12:17:57Z")

</div>

Hey,

iirc no need to set node.data, if called with client(true) afterwards...  
Also you should start() the node, but I guess you just left it out here.

--Alex

On Tue, Aug 13, 2013 at 8:03 PM, vinod eligeti [veligeti999@gmail.com](mailto:veligeti999@gmail.com)wrote:

> I am created an embedded node with no data and with unicast. Is this  
> correct way to do it?
> 
> ```
> NodeBuilder nb = new NodeBuilder().clusterName("log-store");
> nb.settings().put("node.data", false).
> put("discovery.zen.ping.unicast.hosts", "data-host1")
> .put("discovery.zen.ping.multicast.enabled", false);
> 
> ```
> 
> Node node = nb.client(true).node();
> 
> Thanks
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![vinod\_eligeti](https://avatars.discourse-cdn.com/v4/letter/v/c4cdca/32.png) [@vinod\_eligeti](https://discuss.elastic.co/u/vinod_eligeti)\
**Post date:** [August 15, 2013, 4:43pm UTC](https://discuss.elastic.co/t/setting-unicast-mode-in-embedded-node/13202/3 "2013-08-15T16:43:19Z")

</div>

Yes however, can you comment on whether the way i am setting the unicast  
properties are correct or not?

On Thu, Aug 15, 2013 at 5:17 AM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de) wrote:

> Hey,
> 
> iirc no need to set node.data, if called with client(true) afterwards...  
> Also you should start() the node, but I guess you just left it out here.
> 
> --Alex
> 
> On Tue, Aug 13, 2013 at 8:03 PM, vinod eligeti [veligeti999@gmail.com](mailto:veligeti999@gmail.com)wrote:
> 
> > I am created an embedded node with no data and with unicast. Is this  
> > correct way to do it?
> > 
> > ```
> > NodeBuilder nb = new NodeBuilder().clusterName("log-store");
> > nb.settings().put("node.data", false).
> > put("discovery.zen.ping.unicast.hosts", "data-host1")
> > .put("discovery.zen.ping.multicast.enabled", false);
> > 
> > ```
> > 
> > Node node = nb.client(true).node();
> > 
> > Thanks
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/ySECZ7wRakw/unsubscribe](https://groups.google.com/d/topic/elasticsearch/ySECZ7wRakw/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 17, 2013, 4:34pm UTC](https://discuss.elastic.co/t/setting-unicast-mode-in-embedded-node/13202/4 "2013-08-17T16:34:19Z")

</div>

Hey,

they are the same as they would be in your elasticsearch.yml.. if they are  
correct there, the settings are correct here as well, so I guess the answer  
is: yes.  
You might want to use settings.putArray() though, in case you add several  
hosts.

--Alex

On Thu, Aug 15, 2013 at 6:43 PM, vinod eligeti [veligeti999@gmail.com](mailto:veligeti999@gmail.com)wrote:

> Yes however, can you comment on whether the way i am setting the unicast  
> properties are correct or not?
> 
> On Thu, Aug 15, 2013 at 5:17 AM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de)wrote:
> 
> > Hey,
> > 
> > iirc no need to set node.data, if called with client(true) afterwards...  
> > Also you should start() the node, but I guess you just left it out here.
> > 
> > --Alex
> > 
> > On Tue, Aug 13, 2013 at 8:03 PM, vinod eligeti [veligeti999@gmail.com](mailto:veligeti999@gmail.com)wrote:
> > 
> > > I am created an embedded node with no data and with unicast. Is this  
> > > correct way to do it?
> > > 
> > > ```
> > > NodeBuilder nb = new NodeBuilder().clusterName("log-store");
> > > nb.settings().put("node.data", false).
> > > put("discovery.zen.ping.unicast.hosts", "data-host1")
> > > .put("discovery.zen.ping.multicast.enabled", false);
> > > 
> > > ```
> > > 
> > > Node node = nb.client(true).node();
> > > 
> > > Thanks
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/ySECZ7wRakw/unsubscribe](https://groups.google.com/d/topic/elasticsearch/ySECZ7wRakw/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:20am UTC](https://discuss.elastic.co/t/setting-unicast-mode-in-embedded-node/13202/5 "2017-07-06T02:20:44Z")

</div>

Closed on July 6, 2017, 2:20am UTC


