# Java client node creates data directory

**URL:** https://discuss.elastic.co/t/java-client-node-creates-data-directory/21948
**Category:** Elasticsearch
**Created:** [February 2, 2015, 2:08pm UTC](https://discuss.elastic.co/t/java-client-node-creates-data-directory/21948 "2015-02-02T14:08:16Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Daniel\_Woo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_woo/32/949_2.png) [@Daniel\_Woo](https://discuss.elastic.co/u/Daniel_Woo)
#### Post date: [February 2, 2015, 2:08pm UTC](https://discuss.elastic.co/t/java-client-node-creates-data-directory/21948/1 "2015-02-02T14:08:16Z")

</div>

Hi guys, I start a client node with the parameter "node.data" turned off,  
why is the data directory automatically created in my working directory?  
Can I avoid creating the "data" directory since it's a pure client node?

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 2, 2015, 2:31pm UTC](https://discuss.elastic.co/t/java-client-node-creates-data-directory/21948/2 "2015-02-02T14:31:22Z")

</div>

As it's a node, it's storing some cluster info in it.  
You could use a Transport Client which will act as a pure Client without joining the cluster.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 2 févr. 2015 à 15:08, Daniel Woo [daniel.y.woo@gmail.com](mailto:daniel.y.woo@gmail.com) a écrit :
> 
> ## Hi guys, I start a client node with the parameter "node.data" turned off, why is the data directory automatically created in my working directory? Can I avoid creating the "data" directory since it's a pure client node?
> 
> 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).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/D913D5D6-DDF9-4B43-B501-F63EC18F7700%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/D913D5D6-DDF9-4B43-B501-F63EC18F7700%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Daniel\_Woo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_woo/32/949_2.png) [@Daniel\_Woo](https://discuss.elastic.co/u/Daniel_Woo)
#### Post date: [February 2, 2015, 3:30pm UTC](https://discuss.elastic.co/t/java-client-node-creates-data-directory/21948/3 "2015-02-02T15:30:11Z")

</div>

Using a transport client would be slightly slower due to the two-hops,  
that's why I prefer a client node. I guess a pure client node just need  
some cluster info in memory, I don't see a reason why client need to save  
cluster info to disk.  
Now I have a interesting question, if I start multiple client nodes  
(multiple VMs with the same working directory), they will write to the same  
temporary data directory, will the data directory be messed up?

On Monday, February 2, 2015 at 10:31:34 PM UTC+8, David Pilato wrote:

> As it's a node, it's storing some cluster info in it.  
> You could use a Transport Client which will act as a pure Client without  
> joining the cluster.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 2 févr. 2015 à 15:08, Daniel Woo \<[daniel...@gmail.com](mailto:daniel...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Hi guys, I start a client node with the parameter "node.data" turned off,  
> why is the data directory automatically created in my working directory?  
> Can I avoid creating the "data" directory since it's a pure client node?
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 2, 2015, 4:00pm UTC](https://discuss.elastic.co/t/java-client-node-creates-data-directory/21948/4 "2015-02-02T16:00:28Z")

</div>

No each node will use its own subdir. This also applies to data nodes BTW.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 2 févr. 2015 à 16:30, Daniel Woo [daniel.y.woo@gmail.com](mailto:daniel.y.woo@gmail.com) a écrit :
> 
> Using a transport client would be slightly slower due to the two-hops, that's why I prefer a client node. I guess a pure client node just need some cluster info in memory, I don't see a reason why client need to save cluster info to disk.  
> Now I have a interesting question, if I start multiple client nodes (multiple VMs with the same working directory), they will write to the same temporary data directory, will the data directory be messed up?
> 
> On Monday, February 2, 2015 at 10:31:34 PM UTC+8, David Pilato wrote:  
> As it's a node, it's storing some cluster info in it.  
> You could use a Transport Client which will act as a pure Client without joining the cluster.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 2 févr. 2015 à 15:08, Daniel Woo \<[daniel...@gmail.com](mailto:daniel...@gmail.com) \<javascript:\>\> a écrit :
> 
> > Hi guys, I start a client node with the parameter "node.data" turned off, why is the data directory automatically created in my working directory? Can I avoid creating the "data" directory since it's a pure client node?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com?utm_medium=email&utm_source=footer).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/A462087C-2E39-4949-A61D-8BFA46A46475%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/A462087C-2E39-4949-A61D-8BFA46A46475%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [February 2, 2015, 7:07pm UTC](https://discuss.elastic.co/t/java-client-node-creates-data-directory/21948/5 "2015-02-02T19:07:11Z")

</div>

Cluster state must be persisted, that is the reason why NodeClient needs to  
write data to files.

It is a myth that TransportClient is slower because of two-hop. You will  
not notice the difference in reality because the total time of an ES  
operation takes usually longer than the extra hop. And, for the overhead of  
managing cluster state, TransportClient does not need to care about that.

Jörg

On Mon, Feb 2, 2015 at 4:30 PM, Daniel Woo [daniel.y.woo@gmail.com](mailto:daniel.y.woo@gmail.com) wrote:

> Using a transport client would be slightly slower due to the two-hops,  
> that's why I prefer a client node. I guess a pure client node just need  
> some cluster info in memory, I don't see a reason why client need to save  
> cluster info to disk.  
> Now I have a interesting question, if I start multiple client nodes  
> (multiple VMs with the same working directory), they will write to the same  
> temporary data directory, will the data directory be messed up?
> 
> On Monday, February 2, 2015 at 10:31:34 PM UTC+8, David Pilato wrote:
> 
> > As it's a node, it's storing some cluster info in it.  
> > You could use a Transport Client which will act as a pure Client without  
> > joining the cluster.
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 2 févr. 2015 à 15:08, Daniel Woo [daniel...@gmail.com](mailto:daniel...@gmail.com) a écrit :
> > 
> > Hi guys, I start a client node with the parameter "node.data" turned off,  
> > why is the data directory automatically created in my working directory?  
> > Can I avoid creating the "data" directory since it's a pure client node?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%  
> > [40googlegroups.com](http://40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGFWS6rWFxbq\_zwUh%3DZDtbapQgsqaFZ7Tt6F%2BiiJTqR9g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGFWS6rWFxbq_zwUh%3DZDtbapQgsqaFZ7Tt6F%2BiiJTqR9g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Daniel\_Woo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_woo/32/949_2.png) [@Daniel\_Woo](https://discuss.elastic.co/u/Daniel_Woo)
#### Post date: [February 3, 2015, 1:31am UTC](https://discuss.elastic.co/t/java-client-node-creates-data-directory/21948/6 "2015-02-03T01:31:29Z")

</div>

If only each nodes(VMs) use its own sub dir, that's fine. Thanks.

On Tue, Feb 3, 2015 at 12:00 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> No each node will use its own subdir. This also applies to data nodes BTW.
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)  
> [http://Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs  
> [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 2 févr. 2015 à 16:30, Daniel Woo [daniel.y.woo@gmail.com](mailto:daniel.y.woo@gmail.com) a écrit :
> 
> Using a transport client would be slightly slower due to the two-hops,  
> that's why I prefer a client node. I guess a pure client node just need  
> some cluster info in memory, I don't see a reason why client need to save  
> cluster info to disk.  
> Now I have a interesting question, if I start multiple client nodes  
> (multiple VMs with the same working directory), they will write to the same  
> temporary data directory, will the data directory be messed up?
> 
> On Monday, February 2, 2015 at 10:31:34 PM UTC+8, David Pilato wrote:
> 
> > As it's a node, it's storing some cluster info in it.  
> > You could use a Transport Client which will act as a pure Client without  
> > joining the cluster.
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 2 févr. 2015 à 15:08, Daniel Woo [daniel...@gmail.com](mailto:daniel...@gmail.com) a écrit :
> > 
> > Hi guys, I start a client node with the parameter "node.data" turned off,  
> > why is the data directory automatically created in my working directory?  
> > Can I avoid creating the "data" directory since it's a pure client node?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%  
> > [40googlegroups.com](http://40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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/eLIw9LmhFhU/unsubscribe](https://groups.google.com/d/topic/elasticsearch/eLIw9LmhFhU/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/A462087C-2E39-4949-A61D-8BFA46A46475%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/A462087C-2E39-4949-A61D-8BFA46A46475%40pilato.fr)  
> [https://groups.google.com/d/msgid/elasticsearch/A462087C-2E39-4949-A61D-8BFA46A46475%40pilato.fr?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/A462087C-2E39-4949-A61D-8BFA46A46475%40pilato.fr?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Thanks & Regards,  
Daniel

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAF-kt2ur5MnpLdtrbzLJ13mhYM81hBvST0k02Nz%2BfgVUhWs2Ng%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAF-kt2ur5MnpLdtrbzLJ13mhYM81hBvST0k02Nz%2BfgVUhWs2Ng%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Daniel\_Woo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_woo/32/949_2.png) [@Daniel\_Woo](https://discuss.elastic.co/u/Daniel_Woo)
#### Post date: [February 3, 2015, 1:42am UTC](https://discuss.elastic.co/t/java-client-node-creates-data-directory/21948/7 "2015-02-03T01:42:18Z")

</div>

Yes, I guess the extra hop is not a big deal compared to the disk IO ops on  
the data node. I kind of prefer transport client now, the data directory  
really drives me crazy 🙂

On Tue, Feb 3, 2015 at 3:07 AM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<[joergprante@gmail.com](mailto:joergprante@gmail.com)

> wrote:

> Cluster state must be persisted, that is the reason why NodeClient needs  
> to write data to files.
> 
> It is a myth that TransportClient is slower because of two-hop. You will  
> not notice the difference in reality because the total time of an ES  
> operation takes usually longer than the extra hop. And, for the overhead of  
> managing cluster state, TransportClient does not need to care about that.
> 
> Jörg
> 
> On Mon, Feb 2, 2015 at 4:30 PM, Daniel Woo [daniel.y.woo@gmail.com](mailto:daniel.y.woo@gmail.com) wrote:
> 
> > Using a transport client would be slightly slower due to the two-hops,  
> > that's why I prefer a client node. I guess a pure client node just need  
> > some cluster info in memory, I don't see a reason why client need to save  
> > cluster info to disk.  
> > Now I have a interesting question, if I start multiple client nodes  
> > (multiple VMs with the same working directory), they will write to the same  
> > temporary data directory, will the data directory be messed up?
> > 
> > On Monday, February 2, 2015 at 10:31:34 PM UTC+8, David Pilato wrote:
> > 
> > > As it's a node, it's storing some cluster info in it.  
> > > You could use a Transport Client which will act as a pure Client without  
> > > joining the cluster.
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 2 févr. 2015 à 15:08, Daniel Woo [daniel...@gmail.com](mailto:daniel...@gmail.com) a écrit :
> > > 
> > > Hi guys, I start a client node with the parameter "node.data" turned  
> > > off, why is the data directory automatically created in my working  
> > > directory? Can I avoid creating the "data" directory since it's a pure  
> > > client node?
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/37534520-ec4d-4076-b6c6-d6c65b2f9207%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > 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).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/74ad7956-564c-46dd-abaf-5cd7475eacb4%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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/eLIw9LmhFhU/unsubscribe](https://groups.google.com/d/topic/elasticsearch/eLIw9LmhFhU/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGFWS6rWFxbq\_zwUh%3DZDtbapQgsqaFZ7Tt6F%2BiiJTqR9g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGFWS6rWFxbq_zwUh%3DZDtbapQgsqaFZ7Tt6F%2BiiJTqR9g%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGFWS6rWFxbq\_zwUh%3DZDtbapQgsqaFZ7Tt6F%2BiiJTqR9g%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGFWS6rWFxbq_zwUh%3DZDtbapQgsqaFZ7Tt6F%2BiiJTqR9g%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Thanks & Regards,  
Daniel

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAF-kt2vpUjqAm%3DWPShbOfRhWU3qjbEUpA04c5O3cP-z51su5fg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAF-kt2vpUjqAm%3DWPShbOfRhWU3qjbEUpA04c5O3cP-z51su5fg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:35am UTC](https://discuss.elastic.co/t/java-client-node-creates-data-directory/21948/8 "2017-07-06T00:35:17Z")

</div>


