# ES - Yarn - HDFS or NFS

**URL:** <https://discuss.elastic.co/t/es-yarn-hdfs-or-nfs/32116>\
**Category:** Elasticsearch\
**Created:** [October 13, 2015, 8:10pm UTC](https://discuss.elastic.co/t/es-yarn-hdfs-or-nfs/32116 "2015-10-13T20:10:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkat\_gunnu](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@venkat\_gunnu](https://discuss.elastic.co/u/venkat_gunnu)\
**Post date:** [October 13, 2015, 8:10pm UTC](https://discuss.elastic.co/t/es-yarn-hdfs-or-nfs/32116/1 "2015-10-13T20:10:52Z")

</div>

Hi

I am trying to run Elasticsearch in yarn mode. Works fine if I have datapath set to local disk.

I am getting ClassNotFound exception if change the gateway.type to fs or hdfs. From documentation looks like only local gateway module is available and rest are deprecated.

> **[Gateway | Reference \[0.90\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/0.90/modules-gateway.html)**

I mounted the hadoop as NFS now I am getting Stale File Handle Exception. Any thoughts ?

> 2015-10-13 15:54:16,423][DEBUG][transport.netty] [Shola Inkosi] connected to node [[Ani-Mator][Brt2Uuh1QSG5CHJESOPyyQ][n002][inet[/10.11.13.202:9300]]]  
> va:77)  
> at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:245)  
> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)  
> Caused by: java.nio.file.FileSystemException: /mapr/apps/elasticsearch/distdata/data/elasticsearch/nodes/0/ **es**.tmp: Stale file handle  
> at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)  
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)  
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)  
> at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)

---

<div class="post-metadata">

**Author:** ![venkat\_gunnu](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@venkat\_gunnu](https://discuss.elastic.co/u/venkat_gunnu)\
**Post date:** [October 13, 2015, 8:45pm UTC](https://discuss.elastic.co/t/es-yarn-hdfs-or-nfs/32116/2 "2015-10-13T20:45:04Z")

</div>

Ok Changing the datapath to  
/apps/elasticsearch/${HOSTNAME}/data worked.  
Now how to solve the restarts/node failures. In Yarn there is no guarantee same nodes are used after the restart. Is there any environment variable to get the nodeID like '0', '1', '2'. Any pointers are appreciated.

---

<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 5, 2017, 11:45pm UTC](https://discuss.elastic.co/t/es-yarn-hdfs-or-nfs/32116/3 "2017-07-05T23:45:00Z")

</div>


