# Reading data from elasticsearch with ES-Hadoop

**URL:** <https://discuss.elastic.co/t/reading-data-from-elasticsearch-with-es-hadoop/154339>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [October 28, 2018, 12:04pm UTC](https://discuss.elastic.co/t/reading-data-from-elasticsearch-with-es-hadoop/154339 "2018-10-28T12:04:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alizadehei](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@alizadehei](https://discuss.elastic.co/u/alizadehei)\
**Post date:** [October 28, 2018, 12:04pm UTC](https://discuss.elastic.co/t/reading-data-from-elasticsearch-with-es-hadoop/154339/1 "2018-10-28T12:04:53Z")

</div>

i want to retrieve Elasticsearch Data with ES-Hadoop.  
i use the following code to retrieve Elastic data but get Java.io.IOException:

JobConf conf=new JobConf();  
conf.set("es.nodes","10.25.4.12:9200");  
conf.set("es.resource","university/docs");  
conf.set("es.query","?q=\*");  
conf.setInputFormat(EsInputFormat.class);  
conf.setMapOutputKeyClass(Text.class);  
conf.setOutputValueClass(MapWritable.class);  
FileOutputFormat.setOutputPath(conf,new Path(hdfs://10.25.4.12/user));  
JobClient.runJob(conf);

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [October 29, 2018, 2:19pm UTC](https://discuss.elastic.co/t/reading-data-from-elasticsearch-with-es-hadoop/154339/2 "2018-10-29T14:19:11Z")

</div>

You haven't provided much info here that would allow me to help you. Can you include the stack trace and logs from your job?

---

<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:** [November 26, 2018, 2:26pm UTC](https://discuss.elastic.co/t/reading-data-from-elasticsearch-with-es-hadoop/154339/3 "2018-11-26T14:26:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
