# Error while reading elasticsearch data in hadoop program

**URL:** <https://discuss.elastic.co/t/error-while-reading-elasticsearch-data-in-hadoop-program/19676>\
**Category:** Elasticsearch\
**Created:** [September 9, 2014, 8:59am UTC](https://discuss.elastic.co/t/error-while-reading-elasticsearch-data-in-hadoop-program/19676 "2014-09-09T08:59:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaurav\_redkar](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@gaurav\_redkar](https://discuss.elastic.co/u/gaurav_redkar)\
**Post date:** [September 9, 2014, 8:59am UTC](https://discuss.elastic.co/t/error-while-reading-elasticsearch-data-in-hadoop-program/19676/1 "2014-09-09T08:59:03Z")

</div>

Hi, I was following the example given on official elasticsearch  
documentation to read data from elasticsearch using hadoop but i am getting  
the following error.

java.lang.Exception: java.io.IOException: Type mismatch in value from map:  
expected org.apache.hadoop.io.MapWritable, received  
org.elasticsearch.hadoop.mr.LinkedMapWritable

at  
org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)

at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:522)

Caused by: java.io.IOException: Type mismatch in value from map: expected  
org.apache.hadoop.io.MapWritable, received  
org.elasticsearch.hadoop.mr.LinkedMapWritable

at  
org.apache.hadoop.mapred.MapTask$MapOutputBuffer.collect(MapTask.java:1054)

at  
org.apache.hadoop.mapred.MapTask$OldOutputCollector.collect(MapTask.java:587)

at es2.mapper1.map(mapper1.java:29)

at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)

at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)

at org.apache.hadoop.mapred.MapTask.run(MapTask.java:342)

at  
org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:243)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

at java.util.concurrent.FutureTask.run(FutureTask.java:166)

at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:724)

14/09/09 13:25:51 INFO mapreduce.Job: Job job\_local994189535\_0001 failed  
with state FAILED due to: NA

14/09/09 13:25:51 INFO mapreduce.Job: Counters: 0

Exception in thread "main" java.io.IOException: Job failed!

at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:836)

at es2.Es2.main(Es2.java:48)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

14/09/09 13:25:51 INFO mapred.LocalJobRunner: ShardInputSplit  
[node=[QMYbfSRMTsyXVVgfFweMkA/Conceptnet|192.168.1.202:9200],shard=0] \> map

The code for my main runner class is as follows:-

public class Es2 {

```
    static private final Path TMP_DIR = new 

```

Path(Es2.class.getSimpleName()

```
        + "_TMP_1");

/**

 * @param args the command line arguments

 */

public static void main(String[] args) throws IOException{

```

//#String node="192.168.1.202";

```
JobConf conf = new JobConf();

conf.set("es.resource", "data/content");   

conf.set("es.nodes", "192.168.1.202:9200"); 

conf.set("es.query", "?q=s_start:java");

conf.setInputFormat(EsInputFormat.class);       

conf.setMapOutputKeyClass(Text.class);          

conf.setMapOutputValueClass(MapWritable.class);

conf.setOutputKeyClass(Text.class);

conf.setOutputValueClass(MapWritable.class);

conf.setOutputFormat(TextOutputFormat.class);

conf.setMapperClass(mapper1.class);

final Path outDir = new Path(TMP_DIR, "out");

FileOutputFormat.setOutputPath(conf, outDir);

JobClient.runJob(conf);

}

```

}

The code for my mapper class is as follows:-

public class mapper1 extends MapReduceBase implements

```
    Mapper{

```

@Override

public void map(Object key, Object value, OutputCollector output,

```
                Reporter reporter) throws IOException {

```

Text docId = (Text) key;

MapWritable doc = (MapWritable) value;

output.collect(docId,doc);

}

}

Kindly guide me on this issue.

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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3b110c43-faa8-4a08-acfa-0fac5fd89585%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3b110c43-faa8-4a08-acfa-0fac5fd89585%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [September 9, 2014, 10:32am UTC](https://discuss.elastic.co/t/error-while-reading-elasticsearch-data-in-hadoop-program/19676/2 "2014-09-09T10:32:00Z")

</div>

Hi,

What version of es-hadoop are you using? The problem stems from the difference in the types mentioned on your Mapper,  
namely the output value class:

> ```
> conf.setMapOutputValueClass(MapWritable.class);
> 
> ```

to MapWritable while LinkedMapWritable is returned. The latest versions automatically detect this and use the proper  
type so I recommend upgrading.  
If that's not an option, use LinkedMapWritable.

Cheers,

P.S. Please don't post code and stracktraces on the mailing list since it highly reduces the readability of your email.  
Instead use gist or any other service  
to post the code as indicated in the docs [1]. Thanks

[1] [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/2.1.Beta/troubleshooting.html#_where_do_i_post_my_information)

On 9/9/14 11:59 AM, gaurav redkar wrote:

> Hi, I was following the example given on official elasticsearch documentation to read data from elasticsearch using  
> hadoop but i am getting the following error.
> 
> java.lang.Exception: java.io.IOException: Type mismatch in value from map: expected org.apache.hadoop.io.MapWritable,  
> received org.elasticsearch.hadoop.mr.LinkedMapWritable
> 
> at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
> 
> at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:522)
> 
> Caused by: java.io.IOException: Type mismatch in value from map: expected org.apache.hadoop.io.MapWritable, received  
> org.elasticsearch.hadoop.mr.LinkedMapWritable
> 
> at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.collect(MapTask.java:1054)
> 
> at org.apache.hadoop.mapred.MapTask$OldOutputCollector.collect(MapTask.java:587)
> 
> at es2.mapper1.map(mapper1.java:29)
> 
> at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
> 
> at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)
> 
> at org.apache.hadoop.mapred.MapTask.run(MapTask.java:342)
> 
> at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:243)
> 
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> 
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> 
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> 
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 
> at java.lang.Thread.run(Thread.java:724)
> 
> 14/09/09 13:25:51 INFO mapreduce.Job: Job job\_local994189535\_0001 failed with state FAILED due to: NA
> 
> 14/09/09 13:25:51 INFO mapreduce.Job: Counters: 0
> 
> Exception in thread "main" java.io.IOException: Job failed!
> 
> at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:836)
> 
> at es2.Es2.main(Es2.java:48)
> 
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 
> at java.lang.reflect.Method.invoke(Method.java:606)
> 
> at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
> 
> 14/09/09 13:25:51 INFO mapred.LocalJobRunner: ShardInputSplit  
> [node=[QMYbfSRMTsyXVVgfFweMkA/Conceptnet|192.168.1.202:9200],shard=0] \> map
> 
> The code for my main runner class is as follows:-
> 
> public class Es2 {
> 
> ```
> static private final Path TMP_DIR = new Path(Es2.class.getSimpleName()
> 
> + "_TMP_1");
> 
> /**
> 
> * @param args the command line arguments
> 
> */
> 
> public static void main(String[] args) throws IOException{
> 
> //#String node="192.168.1.202";
> 
> JobConf conf = new JobConf();
> 
> conf.set("es.resource", "data/content");
> 
> conf.set("es.nodes", "192.168.1.202:9200");
> 
> conf.set("es.query", "?q=s_start:java");
> 
> conf.setInputFormat(EsInputFormat.class);
> 
> conf.setMapOutputKeyClass(Text.class);
> 
> conf.setMapOutputValueClass(MapWritable.class);
> 
> conf.setOutputKeyClass(Text.class);
> 
> conf.setOutputValueClass(MapWritable.class);
> 
> conf.setOutputFormat(TextOutputFormat.class);
> 
> conf.setMapperClass(mapper1.class);
> 
> final Path outDir = new Path(TMP_DIR, "out");
> 
> FileOutputFormat.setOutputPath(conf, outDir);
> 
> JobClient.runJob(conf);
> 
> }
> 
> ```
> 
> }
> 
> The code for my mapper class is as follows:-
> 
> public class mapper1 extends MapReduceBase implements
> 
> ```
> Mapper{
> 
> ```
> 
> @Override
> 
> public void map(Object key, Object value, OutputCollector output,
> 
> ```
> Reporter reporter) throws IOException {
> 
> Text docId = (Text) key;
> 
> MapWritable doc = (MapWritable) value;
> 
> output.collect(docId,doc);
> 
> ```
> 
> }
> 
> }
> 
> Kindly guide me on this issue.
> 
> 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) [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/3b110c43-faa8-4a08-acfa-0fac5fd89585%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3b110c43-faa8-4a08-acfa-0fac5fd89585%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/3b110c43-faa8-4a08-acfa-0fac5fd89585%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/3b110c43-faa8-4a08-acfa-0fac5fd89585%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Costin

--  
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/540ED720.5040501%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/540ED720.5040501%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![gaurav\_redkar](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@gaurav\_redkar](https://discuss.elastic.co/u/gaurav_redkar)\
**Post date:** [September 9, 2014, 1:06pm UTC](https://discuss.elastic.co/t/error-while-reading-elasticsearch-data-in-hadoop-program/19676/3 "2014-09-09T13:06:20Z")

</div>

Hi Costin,

Thanks for the heads up regarding gist. I will try to follow the guidelines  
in the future. As for my program, I am using Elasticsearch Hadoop  
v2.1.0.Beta1 . I tried your suggestion and changed the output value class  
to LinkedMapWritable. but now I am getting the following error.

> <https://gist.github.com/gauravub/7d55bc6b10cb63935eb8>

Any idea why is this happening ? I even tried using the v2.0.0 of es-hadoop  
but am still getting the same error.

On Tue, Sep 9, 2014 at 4:02 PM, Costin Leau [costin.leau@gmail.com](mailto:costin.leau@gmail.com) wrote:

> Hi,
> 
> What version of es-hadoop are you using? The problem stems from the  
> difference in the types mentioned on your Mapper, namely the output value  
> class:
> 
> ```
> conf.setMapOutputValueClass(MapWritable.class);
> 
> ```
> 
> > 
> 
> to MapWritable while LinkedMapWritable is returned. The latest versions  
> automatically detect this and use the proper type so I recommend upgrading.  
> If that's not an option, use LinkedMapWritable.
> 
> Cheers,
> 
> P.S. Please don't post code and stracktraces on the mailing list since it  
> highly reduces the readability of your email. Instead use gist or any other  
> service  
> to post the code as indicated in the docs [1]. Thanks
> 
> [1] [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/)  
> 2.1.Beta/troubleshooting.html#\_where\_do\_i\_post\_my\_information
> 
> On 9/9/14 11:59 AM, gaurav redkar wrote:
> 
> > Hi, I was following the example given on official elasticsearch  
> > documentation to read data from elasticsearch using  
> > hadoop but i am getting the following error.
> > 
> > java.lang.Exception: java.io.IOException: Type mismatch in value from  
> > map: expected org.apache.hadoop.io.MapWritable,  
> > received org.elasticsearch.hadoop.mr.LinkedMapWritable
> > 
> > at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(  
> > LocalJobRunner.java:462)
> > 
> > at org.apache.hadoop.mapred.LocalJobRunner$Job.run(  
> > LocalJobRunner.java:522)
> > 
> > Caused by: java.io.IOException: Type mismatch in value from map: expected  
> > org.apache.hadoop.io.MapWritable, received  
> > org.elasticsearch.hadoop.mr.LinkedMapWritable
> > 
> > at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.  
> > collect(MapTask.java:1054)
> > 
> > at org.apache.hadoop.mapred.MapTask$OldOutputCollector.  
> > collect(MapTask.java:587)
> > 
> > at es2.mapper1.map(mapper1.java:29)
> > 
> > at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
> > 
> > at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)
> > 
> > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:342)
> > 
> > at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(  
> > LocalJobRunner.java:243)
> > 
> > at java.util.concurrent.Executors$RunnableAdapter.  
> > call(Executors.java:471)
> > 
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> > 
> > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> > 
> > at java.util.concurrent.ThreadPoolExecutor.runWorker(  
> > ThreadPoolExecutor.java:1145)
> > 
> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(  
> > ThreadPoolExecutor.java:615)
> > 
> > at java.lang.Thread.run(Thread.java:724)
> > 
> > 14/09/09 13:25:51 INFO mapreduce.Job: Job job\_local994189535\_0001 failed  
> > with state FAILED due to: NA
> > 
> > 14/09/09 13:25:51 INFO mapreduce.Job: Counters: 0
> > 
> > Exception in thread "main" java.io.IOException: Job failed!
> > 
> > at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:836)
> > 
> > at es2.Es2.main(Es2.java:48)
> > 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 
> > at sun.reflect.NativeMethodAccessorImpl.invoke(  
> > NativeMethodAccessorImpl.java:57)
> > 
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(  
> > DelegatingMethodAccessorImpl.java:43)
> > 
> > at java.lang.reflect.Method.invoke(Method.java:606)
> > 
> > at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
> > 
> > 14/09/09 13:25:51 INFO mapred.LocalJobRunner: ShardInputSplit  
> > [node=[QMYbfSRMTsyXVVgfFweMkA/Conceptnet|192.168.1.202:9200],shard=0] \>  
> > map
> > 
> > The code for my main runner class is as follows:-
> > 
> > public class Es2 {
> > 
> > ```
> > static private final Path TMP_DIR = new
> > 
> > ```
> > 
> > Path(Es2.class.getSimpleName()
> > 
> > ```
> > + "_TMP_1");
> > 
> > /**
> > 
> > * @param args the command line arguments
> > 
> > */
> > 
> > public static void main(String[] args) throws IOException{
> > 
> > //#String node="192.168.1.202";
> > 
> > JobConf conf = new JobConf();
> > 
> > conf.set("es.resource", "data/content");
> > 
> > conf.set("es.nodes", "192.168.1.202:9200");
> > 
> > conf.set("es.query", "?q=s_start:java");
> > 
> > conf.setInputFormat(EsInputFormat.class);
> > 
> > conf.setMapOutputKeyClass(Text.class);
> > 
> > conf.setMapOutputValueClass(MapWritable.class);
> > 
> > conf.setOutputKeyClass(Text.class);
> > 
> > conf.setOutputValueClass(MapWritable.class);
> > 
> > conf.setOutputFormat(TextOutputFormat.class);
> > 
> > conf.setMapperClass(mapper1.class);
> > 
> > final Path outDir = new Path(TMP_DIR, "out");
> > 
> > FileOutputFormat.setOutputPath(conf, outDir);
> > 
> > JobClient.runJob(conf);
> > 
> > }
> > 
> > ```
> > 
> > }
> > 
> > The code for my mapper class is as follows:-
> > 
> > public class mapper1 extends MapReduceBase implements
> > 
> > ```
> > Mapper{
> > 
> > ```
> > 
> > @Override
> > 
> > public void map(Object key, Object value, OutputCollector output,
> > 
> > ```
> > Reporter reporter) throws IOException {
> > 
> > Text docId = (Text) key;
> > 
> > MapWritable doc = (MapWritable) value;
> > 
> > output.collect(docId,doc);
> > 
> > ```
> > 
> > }
> > 
> > }
> > 
> > Kindly guide me on this issue.
> > 
> > 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) \<mailto:elasticsearch+  
> > [unsubscribe@googlegroups.com](mailto:unsubscribe@googlegroups.com)\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/3b110c43-](https://groups.google.com/d/msgid/elasticsearch/3b110c43-)  
> > faa8-4a08-acfa-0fac5fd89585%[40googlegroups.com](http://40googlegroups.com)  
> > \<[https://groups.google.com/d/msgid/elasticsearch/3b110c43-](https://groups.google.com/d/msgid/elasticsearch/3b110c43-)  
> > faa8-4a08-acfa-0fac5fd89585%[40GGGROUPS CASINO – Real Slot Casino for 10,000+ Senior Players](http://40googlegroups.com?utm_medium=)  
> > email&utm\_source=footer\>.  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Costin
> 
> --  
> 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/](https://groups.google.com/d/)  
> topic/elasticsearch/HS1A\_psM7fw/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/](https://groups.google.com/d/)  
> msgid/elasticsearch/540ED720.5040501%[40gmail.com](http://40gmail.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/CAJ1vTBJ%2BgBi6oUwbfxJSrvjXWpu\_FzhJ4T3BbSQ%2BNA-iE\_NtHA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%2BgBi6oUwbfxJSrvjXWpu_FzhJ4T3BbSQ%2BNA-iE_NtHA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [September 9, 2014, 1:22pm UTC](https://discuss.elastic.co/t/error-while-reading-elasticsearch-data-in-hadoop-program/19676/4 "2014-09-09T13:22:13Z")

</div>

Most likely you have a classpath conflict caused by multiple versions of es-hadoop. Can you double check you only have  
one version (2.1.0.Beta1) available?  
Based on the error, I'm guessing you have some 1.3 Mx or the RC somewhere in there...

On 9/9/14 4:06 PM, gaurav redkar wrote:

> Hi Costin,
> 
> Thanks for the heads up regarding gist. I will try to follow the guidelines in the future. As for my program, I am using  
> Elasticsearch Hadoop v2.1.0.Beta1 . I tried your suggestion and changed the output value class to LinkedMapWritable. but  
> now I am getting the following error.
> 
> [error while reading data from elasticsearch in hadoop · GitHub](https://gist.github.com/gauravub/7d55bc6b10cb63935eb8)
> 
> Any idea why is this happening ? I even tried using the v2.0.0 of es-hadoop but am still getting the same error.
> 
> On Tue, Sep 9, 2014 at 4:02 PM, Costin Leau \<[costin.leau@gmail.com](mailto:costin.leau@gmail.com) [mailto:costin.leau@gmail.com](mailto:costin.leau@gmail.com)\> wrote:
> 
> ```
> Hi,
> 
> What version of es-hadoop are you using? The problem stems from the difference in the types mentioned on your
> Mapper, namely the output value class:
> 
> conf.setMapOutputValueClass(__MapWritable.class);
> 
> to MapWritable while LinkedMapWritable is returned. The latest versions automatically detect this and use the proper
> type so I recommend upgrading.
> If that's not an option, use LinkedMapWritable.
> 
> Cheers,
> 
> P.S. Please don't post code and stracktraces on the mailing list since it highly reduces the readability of your
> email. Instead use gist or any other service
> to post the code as indicated in the docs [1]. Thanks
> 
> [1]
> http://www.elasticsearch.org/ __guide/en/elasticsearch/hadoop/__ 2.1.Beta/troubleshooting.html# ___where_do_i_post_my___ information
> <http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/2.1.Beta/troubleshooting.html#_where_do_i_post_my_information>
> 
> On 9/9/14 11:59 AM, gaurav redkar wrote:
> 
> Hi, I was following the example given on official elasticsearch documentation to read data from elasticsearch using
> hadoop but i am getting the following error.
> 
> java.lang.Exception: java.io.IOException: Type mismatch in value from map: expected org.apache.hadoop.io
> <http://org.apache.hadoop.io>.__MapWritable,
> received org.elasticsearch.hadoop.mr <http://org.elasticsearch.hadoop.mr>.__LinkedMapWritable
> 
> at org.apache.hadoop.mapred.__LocalJobRunner$Job.runTasks(__LocalJobRunner.java:462)
> 
> at org.apache.hadoop.mapred.__LocalJobRunner$Job.run(__LocalJobRunner.java:522)
> 
> Caused by: java.io.IOException: Type mismatch in value from map: expected org.apache.hadoop.io
> <http://org.apache.hadoop.io>.__MapWritable, received
> org.elasticsearch.hadoop.mr <http://org.elasticsearch.hadoop.mr>.__LinkedMapWritable
> 
> at org.apache.hadoop.mapred. __MapTask$MapOutputBuffer.__ collect(MapTask.java:1054)
> 
> at org.apache.hadoop.mapred. __MapTask$OldOutputCollector.__ collect(MapTask.java:587)
> 
> at es2.mapper1.map(mapper1.java:__29)
> 
> at org.apache.hadoop.mapred.__MapRunner.run(MapRunner.java:__54)
> 
> at org.apache.hadoop.mapred.__MapTask.runOldMapper(MapTask.__java:430)
> 
> at org.apache.hadoop.mapred.__MapTask.run(MapTask.java:342)
> 
> at org.apache.hadoop.mapred. __LocalJobRunner$Job$__ MapTaskRunnable.run(__LocalJobRunner.java:243)
> 
> at java.util.concurrent. __Executors$RunnableAdapter.__ call(Executors.java:471)
> 
> at java.util.concurrent.__FutureTask$Sync.innerRun(__FutureTask.java:334)
> 
> at java.util.concurrent.__FutureTask.run(FutureTask.__java:166)
> 
> at java.util.concurrent.__ThreadPoolExecutor.runWorker(__ThreadPoolExecutor.java:1145)
> 
> at java.util.concurrent.__ThreadPoolExecutor$Worker.run(__ThreadPoolExecutor.java:615)
> 
> at java.lang.Thread.run(Thread.__java:724)
> 
> 14/09/09 13:25:51 INFO mapreduce.Job: Job job_local994189535_0001 failed with state FAILED due to: NA
> 
> 14/09/09 13:25:51 INFO mapreduce.Job: Counters: 0
> 
> Exception in thread "main" java.io.IOException: Job failed!
> 
> at org.apache.hadoop.mapred.__JobClient.runJob(JobClient.__java:836)
> 
> at es2.Es2.main(Es2.java:48)
> 
> at sun.reflect. __NativeMethodAccessorImpl.__ invoke0(Native Method)
> 
> at sun.reflect. __NativeMethodAccessorImpl.__ invoke( __NativeMethodAccessorImpl.java:__ 57)
> 
> at sun.reflect. __DelegatingMethodAccessorImpl.__ invoke( __DelegatingMethodAccessorImpl.__ java:43)
> 
> at java.lang.reflect.Method.__invoke(Method.java:606)
> 
> at org.apache.hadoop.util.RunJar.__main(RunJar.java:212)
> 
> 14/09/09 13:25:51 INFO mapred.LocalJobRunner: ShardInputSplit
> [node=[QMYbfSRMTsyXVVgfFweMkA/__Conceptnet|192.168.1.202:9200 <http://192.168.1.202:9200>]__,shard=0] > map
> 
> The code for my main runner class is as follows:-
> 
> public class Es2 {
> 
> static private final Path TMP_DIR = new Path(Es2.class.getSimpleName()
> 
> + "_TMP_1");
> 
> /**
> 
> * @param args the command line arguments
> 
> */
> 
> public static void main(String[] args) throws IOException{
> 
> //#String node="192.168.1.202";
> 
> JobConf conf = new JobConf();
> 
> conf.set("es.resource", "data/content");
> 
> conf.set("es.nodes", "192.168.1.202:9200 <http://192.168.1.202:9200>");
> 
> conf.set("es.query", "?q=s_start:java");
> 
> conf.setInputFormat(__EsInputFormat.class);
> 
> conf.setMapOutputKeyClass(__Text.class);
> 
> conf.setMapOutputValueClass(__MapWritable.class);
> 
> conf.setOutputKeyClass(Text.__class);
> 
> conf.setOutputValueClass(__MapWritable.class);
> 
> conf.setOutputFormat(__TextOutputFormat.class);
> 
> conf.setMapperClass(mapper1.__class);
> 
> final Path outDir = new Path(TMP_DIR, "out");
> 
> FileOutputFormat.__setOutputPath(conf, outDir);
> 
> JobClient.runJob(conf);
> 
> }
> 
> }
> 
> The code for my mapper class is as follows:-
> 
> public class mapper1 extends MapReduceBase implements
> 
> Mapper{
> 
> @Override
> 
> public void map(Object key, Object value, OutputCollector output,
> 
> Reporter reporter) throws IOException {
> 
> Text docId = (Text) key;
> 
> MapWritable doc = (MapWritable) value;
> 
> output.collect(docId,doc);
> 
> }
> 
> }
> 
> Kindly guide me on this issue.
> 
> 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%2Bunsubscribe@googlegroups.com>
> <mailto:elasticsearch+__unsubscribe@googlegroups.com <mailto:elasticsearch%2Bunsubscribe@googlegroups.com>>.
> To view this discussion on the web visit
> https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585%__40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/3b110c43-faa8-4a08-acfa-0fac5fd89585%40googlegroups.com>
> <https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585% __40googlegroups.com?utm_medium=__ email&utm_source=footer
> <https://groups.google.com/d/msgid/elasticsearch/3b110c43-faa8-4a08-acfa-0fac5fd89585%40googlegroups.com?utm_medium=email&utm_source=footer>>.
> For more options, visit https://groups.google.com/d/__optout <https://groups.google.com/d/optout>.
> 
> --
> Costin
> 
> --
> 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/HS1A___ psM7fw/unsubscribe
> <https://groups.google.com/d/topic/elasticsearch/HS1A_psM7fw/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@__googlegroups.com
> <mailto:elasticsearch%2Bunsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/ __msgid/elasticsearch/540ED720.__ 5040501%40gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/540ED720.5040501%40gmail.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) [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/CAJ1vTBJ%2BgBi6oUwbfxJSrvjXWpu\_FzhJ4T3BbSQ%2BNA-iE\_NtHA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%2BgBi6oUwbfxJSrvjXWpu_FzhJ4T3BbSQ%2BNA-iE_NtHA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%2BgBi6oUwbfxJSrvjXWpu\_FzhJ4T3BbSQ%2BNA-iE\_NtHA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%2BgBi6oUwbfxJSrvjXWpu_FzhJ4T3BbSQ%2BNA-iE_NtHA%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).  
> --  
> Costin

--  
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/540EFF05.6040508%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/540EFF05.6040508%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![gaurav\_redkar](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@gaurav\_redkar](https://discuss.elastic.co/u/gaurav_redkar)\
**Post date:** [September 9, 2014, 7:26pm UTC](https://discuss.elastic.co/t/error-while-reading-elasticsearch-data-in-hadoop-program/19676/5 "2014-09-09T19:26:56Z")

</div>

Hi Costin,

I had downloaded the elasticsearch-hadoop-2.1.0.Beta1.zip file and used all  
the jars from that for the program. Later I even tried replacing all the  
jars in my program with jars from with elasticsearch-hadoop-2.0.0.zip file,  
but still facing the same error.

On Tue, Sep 9, 2014 at 6:52 PM, Costin Leau [costin.leau@gmail.com](mailto:costin.leau@gmail.com) wrote:

> Most likely you have a classpath conflict caused by multiple versions of  
> es-hadoop. Can you double check you only have one version (2.1.0.Beta1)  
> available?  
> Based on the error, I'm guessing you have some 1.3 Mx or the RC somewhere  
> in there...
> 
> On 9/9/14 4:06 PM, gaurav redkar wrote:
> 
> > Hi Costin,
> > 
> > Thanks for the heads up regarding gist. I will try to follow the  
> > guidelines in the future. As for my program, I am using  
> > Elasticsearch Hadoop v2.1.0.Beta1 . I tried your suggestion and changed  
> > the output value class to LinkedMapWritable. but  
> > now I am getting the following error.
> > 
> > [error while reading data from elasticsearch in hadoop · GitHub](https://gist.github.com/gauravub/7d55bc6b10cb63935eb8)
> > 
> > Any idea why is this happening ? I even tried using the v2.0.0 of  
> > es-hadoop but am still getting the same error.
> > 
> > On Tue, Sep 9, 2014 at 4:02 PM, Costin Leau \<[costin.leau@gmail.com](mailto:costin.leau@gmail.com)  
> > [mailto:costin.leau@gmail.com](mailto:costin.leau@gmail.com)\> wrote:
> > 
> > ```
> > Hi,
> > 
> > What version of es-hadoop are you using? The problem stems from the
> > 
> > ```
> > 
> > difference in the types mentioned on your  
> > Mapper, namely the output value class:
> > 
> > ```
> > conf.setMapOutputValueClass(__MapWritable.class);
> > 
> > to MapWritable while LinkedMapWritable is returned. The latest
> > 
> > ```
> > 
> > versions automatically detect this and use the proper  
> > type so I recommend upgrading.  
> > If that's not an option, use LinkedMapWritable.
> > 
> > ```
> > Cheers,
> > 
> > P.S. Please don't post code and stracktraces on the mailing list
> > 
> > ```
> > 
> > since it highly reduces the readability of your  
> > email. Instead use gist or any other service  
> > to post the code as indicated in the docs [1]. Thanks
> > 
> > ```
> > [1]
> > http://www.elasticsearch.org/__guide/en/elasticsearch/
> > 
> > ```
> > 
> > hadoop/\_\_2.1.Beta/troubleshooting.html#\_\__where_  
> > do\_i\_post\_my\_\_\_information  
> > \<[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/)  
> > 2.1.Beta/troubleshooting.html#\_where\_do\_i\_post\_my\_information\>
> > 
> > ```
> > On 9/9/14 11:59 AM, gaurav redkar wrote:
> > 
> > Hi, I was following the example given on official elasticsearch
> > 
> > ```
> > 
> > documentation to read data from elasticsearch using  
> > hadoop but i am getting the following error.
> > 
> > ```
> > java.lang.Exception: java.io.IOException: Type mismatch in value
> > 
> > ```
> > 
> > from map: expected [org.apache.hadoop.io](http://org.apache.hadoop.io)  
> > [http://org.apache.hadoop.io](http://org.apache.hadoop.io).\_\_MapWritable,  
> > received org.elasticsearch.hadoop.mr \<[http://org.elasticsearch](http://org.elasticsearch).  
> > hadoop.mr\>.\_\_LinkedMapWritable
> > 
> > ```
> > at org.apache.hadoop.mapred.__LocalJobRunner$Job.runTasks(__
> > 
> > ```
> > 
> > LocalJobRunner.java:462)
> > 
> > ```
> > at org.apache.hadoop.mapred.__LocalJobRunner$Job.run(__
> > 
> > ```
> > 
> > LocalJobRunner.java:522)
> > 
> > ```
> > Caused by: java.io.IOException: Type mismatch in value from map:
> > 
> > ```
> > 
> > expected [org.apache.hadoop.io](http://org.apache.hadoop.io)  
> > [http://org.apache.hadoop.io](http://org.apache.hadoop.io).\_\_MapWritable, received  
> > org.elasticsearch.hadoop.mr \<[http://org.elasticsearch.hadoop.mr](http://org.elasticsearch.hadoop.mr)
> > 
> > > .\_\_LinkedMapWritable
> > 
> > ```
> > at org.apache.hadoop.mapred. __MapTask$MapOutputBuffer.__
> > 
> > ```
> > 
> > collect(MapTask.java:1054)
> > 
> > ```
> > at org.apache.hadoop.mapred. __MapTask$OldOutputCollector.__
> > 
> > ```
> > 
> > collect(MapTask.java:587)
> > 
> > ```
> > at es2.mapper1.map(mapper1.java:__29)
> > 
> > at org.apache.hadoop.mapred.__MapRunner.run(MapRunner.java:__54)
> > 
> > at org.apache.hadoop.mapred.__MapTask.runOldMapper(MapTask._
> > 
> > ```
> > 
> > \_java:430)
> > 
> > ```
> > at org.apache.hadoop.mapred.__MapTask.run(MapTask.java:342)
> > 
> > at org.apache.hadoop.mapred. __LocalJobRunner$Job$__
> > 
> > ```
> > 
> > MapTaskRunnable.run(\_\_LocalJobRunner.java:243)
> > 
> > ```
> > at java.util.concurrent. __Executors$RunnableAdapter.__
> > 
> > ```
> > 
> > call(Executors.java:471)
> > 
> > ```
> > at java.util.concurrent.__FutureTask$Sync.innerRun(__
> > 
> > ```
> > 
> > FutureTask.java:334)
> > 
> > ```
> > at java.util.concurrent.__FutureTask.run(FutureTask.__java:166)
> > 
> > at java.util.concurrent.__ThreadPoolExecutor.runWorker(_
> > 
> > ```
> > 
> > \_ThreadPoolExecutor.java:1145)
> > 
> > ```
> > at java.util.concurrent.__ThreadPoolExecutor$Worker.run(
> > 
> > ```
> > 
> > \_\_ThreadPoolExecutor.java:615)
> > 
> > ```
> > at java.lang.Thread.run(Thread.__java:724)
> > 
> > 14/09/09 13:25:51 INFO mapreduce.Job: Job job_local994189535_0001
> > 
> > ```
> > 
> > failed with state FAILED due to: NA
> > 
> > ```
> > 14/09/09 13:25:51 INFO mapreduce.Job: Counters: 0
> > 
> > Exception in thread "main" java.io.IOException: Job failed!
> > 
> > at org.apache.hadoop.mapred.__JobClient.runJob(JobClient.__
> > 
> > ```
> > 
> > java:836)
> > 
> > ```
> > at es2.Es2.main(Es2.java:48)
> > 
> > at sun.reflect. __NativeMethodAccessorImpl.__ invoke0(Native
> > 
> > ```
> > 
> > Method)
> > 
> > ```
> > at sun.reflect. __NativeMethodAccessorImpl.__ invoke(__
> > 
> > ```
> > 
> > NativeMethodAccessorImpl.java:\_\_57)
> > 
> > ```
> > at sun.reflect. __DelegatingMethodAccessorImpl.__ invoke(__
> > 
> > ```
> > 
> > DelegatingMethodAccessorImpl.\_\_java:43)
> > 
> > ```
> > at java.lang.reflect.Method.__invoke(Method.java:606)
> > 
> > at org.apache.hadoop.util.RunJar.__main(RunJar.java:212)
> > 
> > 14/09/09 13:25:51 INFO mapred.LocalJobRunner: ShardInputSplit
> > [node=[QMYbfSRMTsyXVVgfFweMkA/__Conceptnet|192.168.1.202:9200 <
> > 
> > ```
> > 
> > [http://192.168.1.202:9200](http://192.168.1.202:9200)\>]\_\_,shard=0] \> map
> > 
> > ```
> > The code for my main runner class is as follows:-
> > 
> > public class Es2 {
> > 
> > static private final Path TMP_DIR = new
> > 
> > ```
> > 
> > Path(Es2.class.getSimpleName()
> > 
> > ```
> > + "_TMP_1");
> > 
> > /**
> > 
> > * @param args the command line arguments
> > 
> > */
> > 
> > public static void main(String[] args) throws IOException{
> > 
> > //#String node="192.168.1.202";
> > 
> > JobConf conf = new JobConf();
> > 
> > conf.set("es.resource", "data/content");
> > 
> > conf.set("es.nodes", "192.168.1.202:9200 <
> > 
> > ```
> > 
> > [http://192.168.1.202:9200](http://192.168.1.202:9200)\>");
> > 
> > ```
> > conf.set("es.query", "?q=s_start:java");
> > 
> > conf.setInputFormat(__EsInputFormat.class);
> > 
> > conf.setMapOutputKeyClass(__Text.class);
> > 
> > conf.setMapOutputValueClass(__MapWritable.class);
> > 
> > conf.setOutputKeyClass(Text.__class);
> > 
> > conf.setOutputValueClass(__MapWritable.class);
> > 
> > conf.setOutputFormat(__TextOutputFormat.class);
> > 
> > conf.setMapperClass(mapper1.__class);
> > 
> > final Path outDir = new Path(TMP_DIR, "out");
> > 
> > FileOutputFormat.__setOutputPath(conf, outDir);
> > 
> > JobClient.runJob(conf);
> > 
> > }
> > 
> > }
> > 
> > The code for my mapper class is as follows:-
> > 
> > public class mapper1 extends MapReduceBase implements
> > 
> > Mapper{
> > 
> > @Override
> > 
> > public void map(Object key, Object value, OutputCollector
> > 
> > ```
> > 
> > output,
> > 
> > ```
> > Reporter reporter) throws IOException {
> > 
> > Text docId = (Text) key;
> > 
> > MapWritable doc = (MapWritable) value;
> > 
> > output.collect(docId,doc);
> > 
> > }
> > 
> > }
> > 
> > Kindly guide me on this issue.
> > 
> > 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%2Bunsubscribe@googlegroups.com\>  
> > \<[mailto:elasticsearch+\_\_unsubscribe@googlegroups.com](mailto:elasticsearch+__unsubscribe@googlegroups.com) \<mailto:  
> > elasticsearch%2Bunsubscribe@googlegroups.com\>\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/\_\_msgid/elasticsearch/3b110c43-\_](https://groups.google.com/d/__msgid/elasticsearch/3b110c43-_)  
> > \_faa8-4a08-acfa-0fac5fd89585%\_\_40googlegroups.com  
> > \<[https://groups.google.com/d/msgid/elasticsearch/3b110c43-](https://groups.google.com/d/msgid/elasticsearch/3b110c43-)  
> > faa8-4a08-acfa-0fac5fd89585%[40googlegroups.com](http://40googlegroups.com)\>  
> > \<[https://groups.google.com/d/\_\_msgid/elasticsearch/3b110c43-](https://groups.google.com/d/__msgid/elasticsearch/3b110c43-)  
> > \_\_faa8-4a08-acfa-0fac5fd89585%\__[40GGGROUPS CASINO – Real Slot Casino for 10,000+ Senior Players](http://40googlegroups.com?utm)_  
> > medium=\_\_email&utm\_source=footer  
> > \<[https://groups.google.com/d/msgid/elasticsearch/3b110c43-](https://groups.google.com/d/msgid/elasticsearch/3b110c43-)  
> > faa8-4a08-acfa-0fac5fd89585%[40GGGROUPS CASINO – Real Slot Casino for 10,000+ Senior Players](http://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)\>.
> > 
> > ```
> > --
> > Costin
> > 
> > --
> > 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/\_\_](https://groups.google.com/d/__)  
> > topic/elasticsearch/HS1A\_\_\_psM7fw/unsubscribe  
> > \<[https://groups.google.com/d/topic/elasticsearch/HS1A\_](https://groups.google.com/d/topic/elasticsearch/HS1A_)  
> > psM7fw/unsubscribe\>.  
> > To unsubscribe from this group and all its topics, send an email to  
> > elasticsearch+unsubscribe@\_\_googlegroups.com  
> > [mailto:elasticsearch%2Bunsubscribe@googlegroups.com](mailto:elasticsearch%2Bunsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/\_\_msgid/elasticsearch/540ED720.\_](https://groups.google.com/d/__msgid/elasticsearch/540ED720._)  
> > \_5040501%[40gmail.com](http://40gmail.com)  
> > \<[https://groups.google.com/d/msgid/elasticsearch/540ED720](https://groups.google.com/d/msgid/elasticsearch/540ED720).  
> > 5040501%[40gmail.com](http://40gmail.com)\>.
> > 
> > ```
> > For more options, visit 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:unsubscribe@googlegroups.com)\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%25)  
> > 2BgBi6oUwbfxJSrvjXWpu\_FzhJ4T3BbSQ%2BNA-iE\_NtHA%[40mail.gmail.com](http://40mail.gmail.com)  
> > \<[https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%25)  
> > 2BgBi6oUwbfxJSrvjXWpu\_FzhJ4T3BbSQ%2BNA-iE\_NtHA%  
> > [40mail.gmail.com?utm\_medium=email&utm\_source=footer](http://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).
> 
> --  
> Costin
> 
> --  
> 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/](https://groups.google.com/d/)  
> topic/elasticsearch/HS1A\_psM7fw/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/](https://groups.google.com/d/)  
> msgid/elasticsearch/540EFF05.6040508%[40gmail.com](http://40gmail.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/CAJ1vTBKTUr11ck6rSvbzZuf%2Bt1C\_tFMiZP407kvrDK4Yfd5P%3DQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBKTUr11ck6rSvbzZuf%2Bt1C_tFMiZP407kvrDK4Yfd5P%3DQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [September 9, 2014, 8:24pm UTC](https://discuss.elastic.co/t/error-while-reading-elasticsearch-data-in-hadoop-program/19676/6 "2014-09-09T20:24:09Z")

</div>

If by error you mean the ClassNotFoundException, you need to check again your classpath. Also be sure to add es-hadoop  
to your job classpath (typically pack it with the jar) - the documentation  
describes some of the options available [1]

[1] [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/2.1.Beta/mapreduce.html#_installation)

On 9/9/14 10:26 PM, gaurav redkar wrote:

> Hi Costin,
> 
> I had downloaded the elasticsearch-hadoop-2.1.0.Beta1.zip file and used all the jars from that for the program. Later I  
> even tried replacing all the jars in my program with jars from with elasticsearch-hadoop-2.0.0.zip file, but still  
> facing the same error.
> 
> On Tue, Sep 9, 2014 at 6:52 PM, Costin Leau \<[costin.leau@gmail.com](mailto:costin.leau@gmail.com) [mailto:costin.leau@gmail.com](mailto:costin.leau@gmail.com)\> wrote:
> 
> ```
> Most likely you have a classpath conflict caused by multiple versions of es-hadoop. Can you double check you only
> have one version (2.1.0.Beta1) available?
> Based on the error, I'm guessing you have some 1.3 Mx or the RC somewhere in there...
> 
> On 9/9/14 4:06 PM, gaurav redkar wrote:
> 
> Hi Costin,
> 
> Thanks for the heads up regarding gist. I will try to follow the guidelines in the future. As for my program, I
> am using
> Elasticsearch Hadoop v2.1.0.Beta1 . I tried your suggestion and changed the output value class to
> LinkedMapWritable. but
> now I am getting the following error.
> 
> https://gist.github.com/__gauravub/7d55bc6b10cb63935eb8 <https://gist.github.com/gauravub/7d55bc6b10cb63935eb8>
> 
> Any idea why is this happening ? I even tried using the v2.0.0 of es-hadoop but am still getting the same error.
> 
> On Tue, Sep 9, 2014 at 4:02 PM, Costin Leau <costin.leau@gmail.com <mailto:costin.leau@gmail.com>
> <mailto:costin.leau@gmail.com <mailto:costin.leau@gmail.com>>__> wrote:
> 
> Hi,
> 
> What version of es-hadoop are you using? The problem stems from the difference in the types mentioned on your
> Mapper, namely the output value class:
> 
> conf.setMapOutputValueClass( ____ MapWritable.class);
> 
> to MapWritable while LinkedMapWritable is returned. The latest versions automatically detect this and use
> the proper
> type so I recommend upgrading.
> If that's not an option, use LinkedMapWritable.
> 
> Cheers,
> 
> P.S. Please don't post code and stracktraces on the mailing list since it highly reduces the readability of
> your
> email. Instead use gist or any other service
> to post the code as indicated in the docs [1]. Thanks
> 
> [1]
> http://www.elasticsearch.org/ ____guide/en/elasticsearch/__ hadoop/ __2.1.Beta/__ troubleshooting.html# ___where___ do_i_post_my___information
> <http://www.elasticsearch.org/ __guide/en/elasticsearch/hadoop/__ 2.1.Beta/troubleshooting.html# ___where_do_i_post_my___ information>
> 
> <http://www.elasticsearch.org/ __guide/en/elasticsearch/hadoop/__ 2.1.Beta/troubleshooting.html# ___where_do_i_post_my___ information
> <http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/2.1.Beta/troubleshooting.html#_where_do_i_post_my_information>>
> 
> On 9/9/14 11:59 AM, gaurav redkar wrote:
> 
> Hi, I was following the example given on official elasticsearch documentation to read data from
> elasticsearch using
> hadoop but i am getting the following error.
> 
> java.lang.Exception: java.io.IOException: Type mismatch in value from map: expected
> org.apache.hadoop.io <http://org.apache.hadoop.io>
> <http://org.apache.hadoop.io>. ____ MapWritable,
> received org.elasticsearch.hadoop.mr <http://org.elasticsearch.hadoop.mr>
> <http://org.elasticsearch. __hadoop.mr <http://org.elasticsearch.hadoop.mr>>.__ LinkedMapWritable
> 
> at org.apache.hadoop.mapred.____LocalJobRunner$Job.runTasks(____LocalJobRunner.java:462)
> 
> at org.apache.hadoop.mapred.____LocalJobRunner$Job.run(____LocalJobRunner.java:522)
> 
> Caused by: java.io.IOException: Type mismatch in value from map: expected org.apache.hadoop.io
> <http://org.apache.hadoop.io>
> <http://org.apache.hadoop.io>. ____ MapWritable, received
> org.elasticsearch.hadoop.mr <http://org.elasticsearch.hadoop.mr> <http://org.elasticsearch.__hadoop.mr
> <http://org.elasticsearch.hadoop.mr>>.__LinkedMapWritable
> 
> at org.apache.hadoop.mapred. ____MapTask$MapOutputBuffer.____ collect(MapTask.java:1054)
> 
> at org.apache.hadoop.mapred. ____MapTask$OldOutputCollector.____ collect(MapTask.java:587)
> 
> at es2.mapper1.map(mapper1.java: ____ 29)
> 
> at org.apache.hadoop.mapred.____MapRunner.run(MapRunner.java:____54)
> 
> at org.apache.hadoop.mapred.____MapTask.runOldMapper(MapTask.____java:430)
> 
> at org.apache.hadoop.mapred. ____ MapTask.run(MapTask.java:342)
> 
> at org.apache.hadoop.mapred. ____LocalJobRunner$Job$____ MapTaskRunnable.run( ____ LocalJobRunner.java:243)
> 
> at java.util.concurrent. ____Executors$RunnableAdapter.____ call(Executors.java:471)
> 
> at java.util.concurrent.____FutureTask$Sync.innerRun(____FutureTask.java:334)
> 
> at java.util.concurrent.____FutureTask.run(FutureTask.____java:166)
> 
> at java.util.concurrent.____ThreadPoolExecutor.runWorker(____ThreadPoolExecutor.java:1145)
> 
> at java.util.concurrent.____ThreadPoolExecutor$Worker.run(____ThreadPoolExecutor.java:615)
> 
> at java.lang.Thread.run(Thread. ____ java:724)
> 
> 14/09/09 13:25:51 INFO mapreduce.Job: Job job_local994189535_0001 failed with state FAILED due to: NA
> 
> 14/09/09 13:25:51 INFO mapreduce.Job: Counters: 0
> 
> Exception in thread "main" java.io.IOException: Job failed!
> 
> at org.apache.hadoop.mapred.____JobClient.runJob(JobClient.____java:836)
> 
> at es2.Es2.main(Es2.java:48)
> 
> at sun.reflect. ____NativeMethodAccessorImpl.____ invoke0(Native Method)
> 
> at sun.reflect. ____NativeMethodAccessorImpl.____ invoke( ____NativeMethodAccessorImpl.java:____ 57)
> 
> at sun.reflect. ____DelegatingMethodAccessorImpl.____ invoke( ____DelegatingMethodAccessorImpl.____ java:43)
> 
> at java.lang.reflect.Method. ____ invoke(Method.java:606)
> 
> at org.apache.hadoop.util.RunJar. ____ main(RunJar.java:212)
> 
> 14/09/09 13:25:51 INFO mapred.LocalJobRunner: ShardInputSplit
> [node=[QMYbfSRMTsyXVVgfFweMkA/ ____Conceptnet|192.168.1.202:__ 9200 <http://192.168.1.202:9200>
> <http://192.168.1.202:9200>] ____ ,shard=0] > map
> 
> The code for my main runner class is as follows:-
> 
> public class Es2 {
> 
> static private final Path TMP_DIR = new Path(Es2.class.getSimpleName()
> 
> + "_TMP_1");
> 
> /**
> 
> * @param args the command line arguments
> 
> */
> 
> public static void main(String[] args) throws IOException{
> 
> //#String node="192.168.1.202";
> 
> JobConf conf = new JobConf();
> 
> conf.set("es.resource", "data/content");
> 
> conf.set("es.nodes", "192.168.1.202:9200 <http://192.168.1.202:9200> <http://192.168.1.202:9200>");
> 
> conf.set("es.query", "?q=s_start:java");
> 
> conf.setInputFormat( ____ EsInputFormat.class);
> 
> conf.setMapOutputKeyClass( ____ Text.class);
> 
> conf.setMapOutputValueClass( ____ MapWritable.class);
> 
> conf.setOutputKeyClass(Text. ____ class);
> 
> conf.setOutputValueClass( ____ MapWritable.class);
> 
> conf.setOutputFormat( ____ TextOutputFormat.class);
> 
> conf.setMapperClass(mapper1. ____ class);
> 
> final Path outDir = new Path(TMP_DIR, "out");
> 
> FileOutputFormat. ____ setOutputPath(conf, outDir);
> 
> JobClient.runJob(conf);
> 
> }
> 
> }
> 
> The code for my mapper class is as follows:-
> 
> public class mapper1 extends MapReduceBase implements
> 
> Mapper{
> 
> @Override
> 
> public void map(Object key, Object value, OutputCollector output,
> 
> Reporter reporter) throws IOException {
> 
> Text docId = (Text) key;
> 
> MapWritable doc = (MapWritable) value;
> 
> output.collect(docId,doc);
> 
> }
> 
> }
> 
> Kindly guide me on this issue.
> 
> 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@ __go__ oglegroups.com <http://googlegroups.com>
> <mailto:elasticsearch% __2Bunsubscribe@googlegroups.com <mailto:elasticsearch%252Bunsubscribe@googlegroups.com>__ >
> <mailto:elasticsearch+ ____ unsubscribe@googlegroups.com
> <mailto:elasticsearch%2B __unsubscribe@googlegroups.com> <mailto:elasticsearch%__ 2Bunsubscribe@googlegroups.com
> <mailto:elasticsearch%252Bunsubscribe@googlegroups.com>__>>.
> To view this discussion on the web visit
> https://groups.google.com/d/ ____msgid/elasticsearch/3b110c43-____ faa8-4a08-acfa-0fac5fd89585% ____ 40googlegroups.com
> <https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585%__40googlegroups.com>
> 
> <https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585%__40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/3b110c43-faa8-4a08-acfa-0fac5fd89585%40googlegroups.com>>
> 
> <https://groups.google.com/d/ ____msgid/elasticsearch/3b110c43-____ faa8-4a08-acfa-0fac5fd89585% ____40googlegroups.com?utm___ medium= __email&utm_source=__ footer
> <https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585% __40googlegroups.com?utm_medium=__ email&utm_source=footer>
> 
> <https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585% __40googlegroups.com?utm_medium=__ email&utm_source=footer
> <https://groups.google.com/d/msgid/elasticsearch/3b110c43-faa8-4a08-acfa-0fac5fd89585%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>>.
> 
> --
> Costin
> 
> --
> 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/HS1A_____ psM7fw/unsubscribe
> <https://groups.google.com/d/ __topic/elasticsearch/HS1A___ psM7fw/unsubscribe>
> <https://groups.google.com/d/ __topic/elasticsearch/HS1A___ psM7fw/unsubscribe
> <https://groups.google.com/d/topic/elasticsearch/HS1A_psM7fw/unsubscribe>>.
> To unsubscribe from this group and all its topics, send an email to
> elasticsearch+unsubscribe@ __go__ oglegroups.com <http://googlegroups.com>
> <mailto:elasticsearch%__2Bunsubscribe@googlegroups.com
> <mailto:elasticsearch%252Bunsubscribe@googlegroups.com>__>.
> To view this discussion on the web visit
> https://groups.google.com/d/ ____msgid/elasticsearch/540ED720.____ 5040501%40gmail.com
> <https://groups.google.com/d/ __msgid/elasticsearch/540ED720.__ 5040501%40gmail.com>
> <https://groups.google.com/d/ __msgid/elasticsearch/540ED720.__ 5040501%40gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/540ED720.5040501%40gmail.com>>.
> 
> 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%2Bunsubscribe@googlegroups.com>
> <mailto:elasticsearch+__unsubscribe@googlegroups.com <mailto:elasticsearch%2Bunsubscribe@googlegroups.com>>.
> To view this discussion on the web visit
> https://groups.google.com/d/ __msgid/elasticsearch/CAJ1vTBJ%__ 2BgBi6oUwbfxJSrvjXWpu ___FzhJ4T3BbSQ%2BNA-iE_NtHA%__ 40mail.gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%2BgBi6oUwbfxJSrvjXWpu_FzhJ4T3BbSQ%2BNA-iE_NtHA%40mail.gmail.com>
> <https://groups.google.com/d/ __msgid/elasticsearch/CAJ1vTBJ%__ 2BgBi6oUwbfxJSrvjXWpu ___FzhJ4T3BbSQ%2BNA-iE_NtHA%__ 40mail.gmail.com?utm_medium=__email&utm_source=footer
> <https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%2BgBi6oUwbfxJSrvjXWpu_FzhJ4T3BbSQ%2BNA-iE_NtHA%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>.
> 
> --
> Costin
> 
> --
> 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/HS1A___ psM7fw/unsubscribe
> <https://groups.google.com/d/topic/elasticsearch/HS1A_psM7fw/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@__googlegroups.com
> <mailto:elasticsearch%2Bunsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/ __msgid/elasticsearch/540EFF05.__ 6040508%40gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/540EFF05.6040508%40gmail.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) [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/CAJ1vTBKTUr11ck6rSvbzZuf%2Bt1C\_tFMiZP407kvrDK4Yfd5P%3DQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBKTUr11ck6rSvbzZuf%2Bt1C_tFMiZP407kvrDK4Yfd5P%3DQ%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBKTUr11ck6rSvbzZuf%2Bt1C\_tFMiZP407kvrDK4Yfd5P%3DQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBKTUr11ck6rSvbzZuf%2Bt1C_tFMiZP407kvrDK4Yfd5P%3DQ%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).

--  
Costin

--  
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/540F61E9.2030303%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/540F61E9.2030303%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![gaurav\_redkar](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@gaurav\_redkar](https://discuss.elastic.co/u/gaurav_redkar)\
**Post date:** [September 11, 2014, 6:13am UTC](https://discuss.elastic.co/t/error-while-reading-elasticsearch-data-in-hadoop-program/19676/7 "2014-09-11T06:13:04Z")

</div>

Hi Costin,

Thanks for your inputs. I was able to get it running after I copied the  
elasticsearch-hadoop-2.0.0.jar to the "lib" directory of my hadoop  
installation. The reason why I was stuck with this issue is because i had  
already packaged this es-hadoop jar into my application and had built a  
jar. So when I was running the example as follows :-

hadoop jar es2.jar Es2

where Es2 is the name of the runner class which the main() function, I was  
expecting the program to find the required classes since I had already  
bundled the es-hadoop jar within the project jar.

Also in the instructions on the elasticsearch-hadoop documentation at

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

it was mentioned to add the jar to the HADOOP\_CLASSPATH. I first added the  
path to the es-hadoop.jar to the HADOOP\_CLASSPATH, but it gave the same  
error. Later I added the jar to one of paths mentioned within  
HADOOP\_CLASSPATH, and the program executed. Can you guide as to why is it  
working in the second case and not the first case ? Or am I doing something  
wrong ?

Anyway thanks for your guidance.

Regards,  
Gaurav

On Wed, Sep 10, 2014 at 1:54 AM, Costin Leau [costin.leau@gmail.com](mailto:costin.leau@gmail.com) wrote:

> If by error you mean the ClassNotFoundException, you need to check again  
> your classpath. Also be sure to add es-hadoop to your job classpath  
> (typically pack it with the jar) - the documentation  
> describes some of the options available [1]
> 
> [1] [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/)  
> 2.1.Beta/mapreduce.html#\_installation
> 
> On 9/9/14 10:26 PM, gaurav redkar wrote:
> 
> > Hi Costin,
> > 
> > I had downloaded the elasticsearch-hadoop-2.1.0.Beta1.zip file and used  
> > all the jars from that for the program. Later I  
> > even tried replacing all the jars in my program with jars from with  
> > elasticsearch-hadoop-2.0.0.zip file, but still  
> > facing the same error.
> > 
> > On Tue, Sep 9, 2014 at 6:52 PM, Costin Leau \<[costin.leau@gmail.com](mailto:costin.leau@gmail.com)  
> > [mailto:costin.leau@gmail.com](mailto:costin.leau@gmail.com)\> wrote:
> > 
> > ```
> > Most likely you have a classpath conflict caused by multiple versions
> > 
> > ```
> > 
> > of es-hadoop. Can you double check you only  
> > have one version (2.1.0.Beta1) available?  
> > Based on the error, I'm guessing you have some 1.3 Mx or the RC  
> > somewhere in there...
> > 
> > ```
> > On 9/9/14 4:06 PM, gaurav redkar wrote:
> > 
> > Hi Costin,
> > 
> > Thanks for the heads up regarding gist. I will try to follow the
> > 
> > ```
> > 
> > guidelines in the future. As for my program, I  
> > am using  
> > Elasticsearch Hadoop v2.1.0.Beta1 . I tried your suggestion and  
> > changed the output value class to  
> > LinkedMapWritable. but  
> > now I am getting the following error.
> > 
> > ```
> > https://gist.github.com/__gauravub/7d55bc6b10cb63935eb8 <
> > 
> > ```
> > 
> > [error while reading data from elasticsearch in hadoop · GitHub](https://gist.github.com/gauravub/7d55bc6b10cb63935eb8)\>
> > 
> > ```
> > Any idea why is this happening ? I even tried using the v2.0.0 of
> > 
> > ```
> > 
> > es-hadoop but am still getting the same error.
> > 
> > ```
> > On Tue, Sep 9, 2014 at 4:02 PM, Costin Leau <
> > 
> > ```
> > 
> > [costin.leau@gmail.com](mailto:costin.leau@gmail.com) [mailto:costin.leau@gmail.com](mailto:costin.leau@gmail.com)  
> > \<[mailto:costin.leau@gmail.com](mailto:costin.leau@gmail.com) [mailto:costin.leau@gmail.com](mailto:costin.leau@gmail.com)\>\_\_\>  
> > wrote:
> > 
> > ```
> > Hi,
> > 
> > What version of es-hadoop are you using? The problem stems
> > 
> > ```
> > 
> > from the difference in the types mentioned on your  
> > Mapper, namely the output value class:
> > 
> > ```
> > conf.setMapOutputValueClass(__
> > 
> > ```
> > 
> > \_\_MapWritable.class);
> > 
> > ```
> > to MapWritable while LinkedMapWritable is returned. The
> > 
> > ```
> > 
> > latest versions automatically detect this and use  
> > the proper  
> > type so I recommend upgrading.  
> > If that's not an option, use LinkedMapWritable.
> > 
> > ```
> > Cheers,
> > 
> > P.S. Please don't post code and stracktraces on the mailing
> > 
> > ```
> > 
> > list since it highly reduces the readability of  
> > your  
> > email. Instead use gist or any other service  
> > to post the code as indicated in the docs [1]. Thanks
> > 
> > ```
> > [1]
> > http://www.elasticsearch.org/ ____guide/en/elasticsearch/__
> > 
> > ```
> > 
> > hadoop/\_\_2.1.Beta/\_\_troubleshooting.html#\_\__where_  
> > \_\_do\_i\_post\_my\_\_\_information  
> > \<[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/__guide/en/elasticsearch/)  
> > hadoop/\_\_2.1.Beta/troubleshooting.html#\_\__where_  
> > do\_i\_post\_my\_\_\_information\>
> > 
> > ```
> > <http://www.elasticsearch.org/__guide/en/elasticsearch/
> > 
> > ```
> > 
> > hadoop/\_\_2.1.Beta/troubleshooting.html#\_\__where_  
> > do\_i\_post\_my\_\_\_information  
> > \<[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/)  
> > 2.1.Beta/troubleshooting.html#\_where\_do\_i\_post\_my\_information\>\>
> > 
> > ```
> > On 9/9/14 11:59 AM, gaurav redkar wrote:
> > 
> > Hi, I was following the example given on official
> > 
> > ```
> > 
> > elasticsearch documentation to read data from  
> > elasticsearch using  
> > hadoop but i am getting the following error.
> > 
> > ```
> > java.lang.Exception: java.io.IOException: Type mismatch
> > 
> > ```
> > 
> > in value from map: expected  
> > [org.apache.hadoop.io](http://org.apache.hadoop.io) [http://org.apache.hadoop.io](http://org.apache.hadoop.io)  
> > [http://org.apache.hadoop.io](http://org.apache.hadoop.io).\_\_\_\_MapWritable,  
> > received org.elasticsearch.hadoop.mr \<  
> > [http://org.elasticsearch.hadoop.mr](http://org.elasticsearch.hadoop.mr)\>  
> > \<[http://org.elasticsearch](http://org.elasticsearch).\_\_hadoop.mr \<[http://org.elasticsearch](http://org.elasticsearch).  
> > hadoop.mr\>\>.\_\_LinkedMapWritable
> > 
> > ```
> > at org.apache.hadoop.mapred. ____
> > 
> > ```
> > 
> > LocalJobRunner$Job.runTasks(\_\_\_\_LocalJobRunner.java:462)
> > 
> > ```
> > at org.apache.hadoop.mapred. ____
> > 
> > ```
> > 
> > LocalJobRunner$Job.run(\_\_\_\_LocalJobRunner.java:522)
> > 
> > ```
> > Caused by: java.io.IOException: Type mismatch in value
> > 
> > ```
> > 
> > from map: expected [org.apache.hadoop.io](http://org.apache.hadoop.io)  
> > [http://org.apache.hadoop.io](http://org.apache.hadoop.io)  
> > [http://org.apache.hadoop.io](http://org.apache.hadoop.io).\_\_\_\_MapWritable, received  
> > org.elasticsearch.hadoop.mr [http://org.elasticsearch.hadoop.mr](http://org.elasticsearch.hadoop.mr)  
> > \<[http://org.elasticsearch](http://org.elasticsearch).\_\_hadoop.mr  
> > [http://org.elasticsearch.hadoop.mr](http://org.elasticsearch.hadoop.mr)\>.\_\_LinkedMapWritable
> > 
> > ```
> > at org.apache.hadoop.mapred. ____
> > 
> > ```
> > 
> > MapTask$MapOutputBuffer.\_\_\_\_collect(MapTask.java:1054)
> > 
> > ```
> > at org.apache.hadoop.mapred. ____
> > 
> > ```
> > 
> > MapTask$OldOutputCollector.\_\_\_\_collect(MapTask.java:587)
> > 
> > ```
> > at es2.mapper1.map(mapper1.java: ____ 29)
> > 
> > at org.apache.hadoop.mapred. ____
> > 
> > ```
> > 
> > MapRunner.run(MapRunner.java:\_\_\_\_54)
> > 
> > ```
> > at org.apache.hadoop.mapred. ____
> > 
> > ```
> > 
> > MapTask.runOldMapper(MapTask.\_\_\_\_java:430)
> > 
> > ```
> > at org.apache.hadoop.mapred. ____
> > 
> > ```
> > 
> > MapTask.run(MapTask.java:342)
> > 
> > ```
> > at org.apache.hadoop.mapred. ____LocalJobRunner$Job$____
> > 
> > ```
> > 
> > MapTaskRunnable.run(\_\_\_\_LocalJobRunner.java:243)
> > 
> > ```
> > at java.util.concurrent. ____
> > 
> > ```
> > 
> > Executors$RunnableAdapter.\_\_\_\_call(Executors.java:471)
> > 
> > ```
> > at java.util.concurrent. ____
> > 
> > ```
> > 
> > FutureTask$Sync.innerRun(\_\_\_\_FutureTask.java:334)
> > 
> > ```
> > at java.util.concurrent. ____
> > 
> > ```
> > 
> > FutureTask.run(FutureTask.\_\_\_\_java:166)
> > 
> > ```
> > at java.util.concurrent. ____
> > 
> > ```
> > 
> > ThreadPoolExecutor.runWorker(\_\_\_\_ThreadPoolExecutor.java:1145)
> > 
> > ```
> > at java.util.concurrent. ____
> > 
> > ```
> > 
> > ThreadPoolExecutor$Worker.run(\_\_\_\_ThreadPoolExecutor.java:615)
> > 
> > ```
> > at java.lang.Thread.run(Thread. ____ java:724)
> > 
> > 14/09/09 13:25:51 INFO mapreduce.Job: Job
> > 
> > ```
> > 
> > job\_local994189535\_0001 failed with state FAILED due to: NA
> > 
> > ```
> > 14/09/09 13:25:51 INFO mapreduce.Job: Counters: 0
> > 
> > Exception in thread "main" java.io.IOException: Job
> > 
> > ```
> > 
> > failed!
> > 
> > ```
> > at org.apache.hadoop.mapred. ____
> > 
> > ```
> > 
> > JobClient.runJob(JobClient.\_\_\_\_java:836)
> > 
> > ```
> > at es2.Es2.main(Es2.java:48)
> > 
> > at sun.reflect. ____NativeMethodAccessorImpl.____ invoke0(Native
> > 
> > ```
> > 
> > Method)
> > 
> > ```
> > at sun.reflect. ____NativeMethodAccessorImpl.____
> > 
> > ```
> > 
> > invoke(\_\_\_\_NativeMethodAccessorImpl.java:\_\_\_\_57)
> > 
> > ```
> > at sun.reflect. ____ DelegatingMethodAccessorImpl._
> > 
> > ```
> > 
> > \_\_\_invoke(\_\_\_\_DelegatingMethodAccessorImpl.\_\_\_\_java:43)
> > 
> > ```
> > at java.lang.reflect.Method. ____ invoke(Method.java:606)
> > 
> > at org.apache.hadoop.util.RunJar.
> > 
> > ```
> > 
> > \_\_\_\_main(RunJar.java:212)
> > 
> > ```
> > 14/09/09 13:25:51 INFO mapred.LocalJobRunner:
> > 
> > ```
> > 
> > ShardInputSplit  
> > [node=[QMYbfSRMTsyXVVgfFweMkA/  
> > **Conceptnet|192.168.1.202:\_\_9200 [http://192.168.1.202:9200](http://192.168.1.202:9200)  
> > [http://192.168.1.202:9200](http://192.168.1.202:9200)]**,shard=0] \> map
> > 
> > ```
> > The code for my main runner class is as follows:-
> > 
> > public class Es2 {
> > 
> > static private final Path TMP_DIR = new
> > 
> > ```
> > 
> > Path(Es2.class.getSimpleName()
> > 
> > ```
> > + "_TMP_1");
> > 
> > /**
> > 
> > * @param args the command line arguments
> > 
> > */
> > 
> > public static void main(String[] args) throws
> > 
> > ```
> > 
> > IOException{
> > 
> > ```
> > //#String node="192.168.1.202";
> > 
> > JobConf conf = new JobConf();
> > 
> > conf.set("es.resource", "data/content");
> > 
> > conf.set("es.nodes", "192.168.1.202:9200 <
> > 
> > ```
> > 
> > [http://192.168.1.202:9200](http://192.168.1.202:9200)\> [http://192.168.1.202:9200](http://192.168.1.202:9200)");
> > 
> > ```
> > conf.set("es.query", "?q=s_start:java");
> > 
> > conf.setInputFormat( ____ EsInputFormat.class);
> > 
> > conf.setMapOutputKeyClass( ____ Text.class);
> > 
> > conf.setMapOutputValueClass(__
> > 
> > ```
> > 
> > \_\_MapWritable.class);
> > 
> > ```
> > conf.setOutputKeyClass(Text. ____ class);
> > 
> > conf.setOutputValueClass( ____ MapWritable.class);
> > 
> > conf.setOutputFormat( ____ TextOutputFormat.class);
> > 
> > conf.setMapperClass(mapper1. ____ class);
> > 
> > final Path outDir = new Path(TMP_DIR, "out");
> > 
> > FileOutputFormat. ____ setOutputPath(conf, outDir);
> > 
> > JobClient.runJob(conf);
> > 
> > }
> > 
> > }
> > 
> > The code for my mapper class is as follows:-
> > 
> > public class mapper1 extends MapReduceBase implements
> > 
> > Mapper{
> > 
> > @Override
> > 
> > public void map(Object key, Object value,
> > 
> > ```
> > 
> > OutputCollector output,
> > 
> > ```
> > Reporter reporter) throws
> > 
> > ```
> > 
> > IOException {
> > 
> > ```
> > Text docId = (Text) key;
> > 
> > MapWritable doc = (MapWritable) value;
> > 
> > output.collect(docId,doc);
> > 
> > }
> > 
> > }
> > 
> > Kindly guide me on this issue.
> > 
> > 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@\_\_go\_\_oglegroups.com \<  
> > [http://googlegroups.com](http://googlegroups.com)\>  
> > \<mailto:elasticsearch%**[2Bunsubscribe@googlegroups.com](mailto:2Bunsubscribe@googlegroups.com) \<mailto:  
> > elasticsearch%252Bunsubscribe@googlegroups.com\>**\>  
> > \<[mailto:elasticsearch+\_\_\_\_unsubscribe@googlegroups.com](mailto:elasticsearch+ ____ unsubscribe@googlegroups.com)  
> > [mailto:elasticsearch%2B\_\_unsubscribe@googlegroups.com](mailto:elasticsearch%2B__unsubscribe@googlegroups.com) \<mailto:  
> > elasticsearch%**[2Bunsubscribe@googlegroups.com](mailto:2Bunsubscribe@googlegroups.com)  
> > [mailto:elasticsearch%252Bunsubscribe@googlegroups.com](mailto:elasticsearch%252Bunsubscribe@googlegroups.com)**\>\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/\_\_\_\_msgid/elasticsearch/](https://groups.google.com/d/ ____ msgid/elasticsearch/)  
> > 3b110c43-\_\_\_\_faa8-4a08-acfa-0fac5fd89585%\_\_\_\_40googlegroups.com  
> > \<[https://groups.google.com/d/\_\_msgid/elasticsearch/3b110c43-](https://groups.google.com/d/__msgid/elasticsearch/3b110c43-)  
> > \_\_faa8-4a08-acfa-0fac5fd89585%\_\_40googlegroups.com\>
> > 
> > ```
> > <https://groups.google.com/d/__msgid/elasticsearch/3b110c43-
> > 
> > ```
> > 
> > \_\_faa8-4a08-acfa-0fac5fd89585%\_\_40googlegroups.com  
> > \<[https://groups.google.com/d/msgid/elasticsearch/3b110c43-](https://groups.google.com/d/msgid/elasticsearch/3b110c43-)  
> > faa8-4a08-acfa-0fac5fd89585%[40googlegroups.com](http://40googlegroups.com)\>\>
> > 
> > ```
> > <https://groups.google.com/d/ ____ msgid/elasticsearch/
> > 
> > ```
> > 
> > 3b110c43-\_\_\_\_faa8-4a08-acfa-0fac5fd89585%\__**[40GGGROUPS CASINO – Real Slot Casino for 10,000+ Senior Players](http://40googlegroups.com?utm)**_  
> > medium=\_\_email&utm\_source=\_\_footer  
> > \<[https://groups.google.com/d/\_\_msgid/elasticsearch/3b110c43-](https://groups.google.com/d/__msgid/elasticsearch/3b110c43-)  
> > \_\_faa8-4a08-acfa-0fac5fd89585%\__[40GGGROUPS CASINO – Real Slot Casino for 10,000+ Senior Players](http://40googlegroups.com?utm)_  
> > medium=\_\_email&utm\_source=footer\>
> > 
> > ```
> > <https://groups.google.com/d/__msgid/elasticsearch/3b110c43-
> > 
> > ```
> > 
> > \_\_faa8-4a08-acfa-0fac5fd89585%\__[40GGGROUPS CASINO – Real Slot Casino for 10,000+ Senior Players](http://40googlegroups.com?utm)_  
> > medium=\_\_email&utm\_source=footer  
> > \<[https://groups.google.com/d/msgid/elasticsearch/3b110c43-](https://groups.google.com/d/msgid/elasticsearch/3b110c43-)  
> > faa8-4a08-acfa-0fac5fd89585%[40GGGROUPS CASINO – Real Slot Casino for 10,000+ Senior Players](http://40googlegroups.com?utm_medium=)  
> > email&utm\_source=footer\>\>\>.  
> > For more options, visit [https://groups.google.com/d/\_\_](https://groups.google.com/d/__)  
> > \_\_optout [https://groups.google.com/d/\_\_optout](https://groups.google.com/d/__optout)  
> > \<[https://groups.google.com/d/\_\_optout](https://groups.google.com/d/__optout) \<  
> > [https://groups.google.com/d/optout](https://groups.google.com/d/optout)\>\>.
> > 
> > ```
> > --
> > Costin
> > 
> > --
> > 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/HS1A\_\_\_\_](https://groups.google.com/d/ ____topic/elasticsearch/HS1A____ )  
> > \_psM7fw/unsubscribe  
> > \<[https://groups.google.com/d/\_\_topic/elasticsearch/HS1A\_\_\_](https://groups.google.com/d/ __topic/elasticsearch/HS1A___ )  
> > psM7fw/unsubscribe\>  
> > \<[https://groups.google.com/d/\_\_topic/elasticsearch/HS1A\_\_\_](https://groups.google.com/d/ __topic/elasticsearch/HS1A___ )  
> > psM7fw/unsubscribe  
> > \<[https://groups.google.com/d/topic/elasticsearch/HS1A\_](https://groups.google.com/d/topic/elasticsearch/HS1A_)  
> > psM7fw/unsubscribe\>\>.  
> > To unsubscribe from this group and all its topics, send an  
> > email to  
> > elasticsearch+unsubscribe@\_\_go\_\_oglegroups.com \<  
> > [http://googlegroups.com](http://googlegroups.com)\>  
> > \<mailto:elasticsearch%**[2Bunsubscribe@googlegroups.com](mailto:2Bunsubscribe@googlegroups.com)  
> > [mailto:elasticsearch%252Bunsubscribe@googlegroups.com](mailto:elasticsearch%252Bunsubscribe@googlegroups.com)**\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/\_\_\_\_msgid/elasticsearch/](https://groups.google.com/d/ ____ msgid/elasticsearch/)  
> > 540ED720.\_\_\_\_5040501%[40gmail.com](http://40gmail.com)  
> > \<[https://groups.google.com/d/\_\_msgid/elasticsearch/540ED720](https://groups.google.com/d/__msgid/elasticsearch/540ED720).  
> > \_\_5040501%[40gmail.com](http://40gmail.com)\>  
> > \<[https://groups.google.com/d/\_\_msgid/elasticsearch/540ED720](https://groups.google.com/d/__msgid/elasticsearch/540ED720).  
> > \_\_5040501%[40gmail.com](http://40gmail.com)  
> > \<[https://groups.google.com/d/msgid/elasticsearch/540ED720](https://groups.google.com/d/msgid/elasticsearch/540ED720).  
> > 5040501%[40gmail.com](http://40gmail.com)\>\>.
> > 
> > ```
> > 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](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%2Bunsubscribe@googlegroups.com\>  
> > \<[mailto:elasticsearch+\_\_unsubscribe@googlegroups.com](mailto:elasticsearch+__unsubscribe@googlegroups.com) \<mailto:  
> > elasticsearch%2Bunsubscribe@googlegroups.com\>\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/\_\_msgid/elasticsearch/CAJ1vTBJ%\_](https://groups.google.com/d/__msgid/elasticsearch/CAJ1vTBJ%25_)  
> > \_2BgBi6oUwbfxJSrvjXWpu\_\_\_FzhJ4T3BbSQ%2BNA-iE\_NtHA%\_\_40mail.gmail.com  
> > \<[https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%25)  
> > 2BgBi6oUwbfxJSrvjXWpu\_FzhJ4T3BbSQ%2BNA-iE\_NtHA%[40mail.gmail.com](http://40mail.gmail.com)\>  
> > \<[https://groups.google.com/d/\_\_msgid/elasticsearch/CAJ1vTBJ%](https://groups.google.com/d/__msgid/elasticsearch/CAJ1vTBJ%25)  
> > **2BgBi6oUwbfxJSrvjXWpu\_\_\_FzhJ4T3BbSQ%2BNA-iE\_NtHA%**  
> > [40mail.gmail.com?utm\_medium=\_\_email&utm\_source=footer](http://40mail.gmail.com?utm_medium=__email&utm_source=footer)  
> > \<[https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%25)  
> > 2BgBi6oUwbfxJSrvjXWpu\_FzhJ4T3BbSQ%2BNA-iE\_NtHA%  
> > [40mail.gmail.com?utm\_medium=email&utm\_source=footer](http://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) \<  
> > [https://groups.google.com/d/optout](https://groups.google.com/d/optout)\>.
> > 
> > ```
> > --
> > Costin
> > 
> > --
> > 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/\_\_](https://groups.google.com/d/__)  
> > topic/elasticsearch/HS1A\_\_\_psM7fw/unsubscribe  
> > \<[https://groups.google.com/d/topic/elasticsearch/HS1A\_](https://groups.google.com/d/topic/elasticsearch/HS1A_)  
> > psM7fw/unsubscribe\>.  
> > To unsubscribe from this group and all its topics, send an email to  
> > elasticsearch+unsubscribe@\_\_googlegroups.com  
> > [mailto:elasticsearch%2Bunsubscribe@googlegroups.com](mailto:elasticsearch%2Bunsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/\_\_msgid/elasticsearch/540EFF05.\_](https://groups.google.com/d/__msgid/elasticsearch/540EFF05._)  
> > \_6040508%[40gmail.com](http://40gmail.com)  
> > \<[https://groups.google.com/d/msgid/elasticsearch/540EFF05](https://groups.google.com/d/msgid/elasticsearch/540EFF05).  
> > 6040508%[40gmail.com](http://40gmail.com)\>.
> > 
> > ```
> > For more options, visit 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:unsubscribe@googlegroups.com)\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBKTUr11ck6rSvbzZuf%](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBKTUr11ck6rSvbzZuf%25)  
> > 2Bt1C\_tFMiZP407kvrDK4Yfd5P%3DQ%[40mail.gmail.com](http://40mail.gmail.com)  
> > \<[https://groups.google.com/d/msgid/elasticsearch/](https://groups.google.com/d/msgid/elasticsearch/)  
> > CAJ1vTBKTUr11ck6rSvbzZuf%2Bt1C\_tFMiZP407kvrDK4Yfd5P%  
> > 3DQ%[40mail.gmail.com?utm\_medium=email&utm\_source=footer](http://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).
> 
> --  
> Costin
> 
> --  
> 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/](https://groups.google.com/d/)  
> topic/elasticsearch/HS1A\_psM7fw/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/](https://groups.google.com/d/)  
> msgid/elasticsearch/540F61E9.2030303%[40gmail.com](http://40gmail.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/CAJ1vTBJze%2BfmPRz52i03pmAT1F29CPA\_mUzLtfZKjN2mkaSf1Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJze%2BfmPRz52i03pmAT1F29CPA_mUzLtfZKjN2mkaSf1Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [September 11, 2014, 7:24am UTC](https://discuss.elastic.co/t/error-while-reading-elasticsearch-data-in-hadoop-program/19676/8 "2014-09-11T07:24:04Z")

</div>

Unfortunately there's no clear answer since each distro and version (in particular 1.x vs 2.x) added more options to  
configure the classpath and thus configure the cluster and its jobs.  
This is actually the reason why in the docs we don't recommend one big way - the classpath config is fragile (the order  
of the arguments matter, one settings can override another, a different env variable is read instead of another) etc...

You could try following up with the distro (apache or not) docs and potentially mailing list. Additionally you can try  
checking out the sources in particular the start-up scripts...

On 9/11/14 9:13 AM, gaurav redkar wrote:

> Hi Costin,
> 
> Thanks for your inputs. I was able to get it running after I copied the elasticsearch-hadoop-2.0.0.jar to the "lib"  
> directory of my hadoop installation. The reason why I was stuck with this issue is because i had already packaged this  
> es-hadoop jar into my application and had built a jar. So when I was running the example as follows :-
> 
> hadoop jar es2.jar Es2
> 
> where Es2 is the name of the runner class which the main() function, I was expecting the program to find the required  
> classes since I had already bundled the es-hadoop jar within the project jar.
> 
> Also in the instructions on the elasticsearch-hadoop documentation at
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/mapreduce.html#CO14-2)
> 
> it was mentioned to add the jar to the HADOOP\_CLASSPATH. I first added the path to the es-hadoop.jar to the  
> HADOOP\_CLASSPATH, but it gave the same error. Later I added the jar to one of paths mentioned within HADOOP\_CLASSPATH,  
> and the program executed. Can you guide as to why is it working in the second case and not the first case ? Or am I  
> doing something wrong ?
> 
> Anyway thanks for your guidance.
> 
> Regards,  
> Gaurav
> 
> On Wed, Sep 10, 2014 at 1:54 AM, Costin Leau \<[costin.leau@gmail.com](mailto:costin.leau@gmail.com) [mailto:costin.leau@gmail.com](mailto:costin.leau@gmail.com)\> wrote:
> 
> ```
> If by error you mean the ClassNotFoundException, you need to check again your classpath. Also be sure to add
> es-hadoop to your job classpath (typically pack it with the jar) - the documentation
> describes some of the options available [1]
> 
> [1] http://www.elasticsearch.org/ __guide/en/elasticsearch/hadoop/__ 2.1.Beta/mapreduce.html#___installation
> <http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/2.1.Beta/mapreduce.html#_installation>
> 
> On 9/9/14 10:26 PM, gaurav redkar wrote:
> 
> Hi Costin,
> 
> I had downloaded the elasticsearch-hadoop-2.1.0.__Beta1.zip file and used all the jars from that for the
> program. Later I
> even tried replacing all the jars in my program with jars from with elasticsearch-hadoop-2.0.0.zip file, but still
> facing the same error.
> 
> On Tue, Sep 9, 2014 at 6:52 PM, Costin Leau <costin.leau@gmail.com <mailto:costin.leau@gmail.com>
> <mailto:costin.leau@gmail.com <mailto:costin.leau@gmail.com>>__> wrote:
> 
> Most likely you have a classpath conflict caused by multiple versions of es-hadoop. Can you double check
> you only
> have one version (2.1.0.Beta1) available?
> Based on the error, I'm guessing you have some 1.3 Mx or the RC somewhere in there...
> 
> On 9/9/14 4:06 PM, gaurav redkar wrote:
> 
> Hi Costin,
> 
> Thanks for the heads up regarding gist. I will try to follow the guidelines in the future. As for my
> program, I
> am using
> Elasticsearch Hadoop v2.1.0.Beta1 . I tried your suggestion and changed the output value class to
> LinkedMapWritable. but
> now I am getting the following error.
> 
> https://gist.github.com/ ____ gauravub/7d55bc6b10cb63935eb8
> <https://gist.github.com/__gauravub/7d55bc6b10cb63935eb8>
> <https://gist.github.com/__gauravub/7d55bc6b10cb63935eb8 <https://gist.github.com/gauravub/7d55bc6b10cb63935eb8>>
> 
> Any idea why is this happening ? I even tried using the v2.0.0 of es-hadoop but am still getting the
> same error.
> 
> On Tue, Sep 9, 2014 at 4:02 PM, Costin Leau <costin.leau@gmail.com <mailto:costin.leau@gmail.com>
> <mailto:costin.leau@gmail.com <mailto:costin.leau@gmail.com>>
> <mailto:costin.leau@gmail.com <mailto:costin.leau@gmail.com> <mailto:costin.leau@gmail.com
> <mailto:costin.leau@gmail.com>> __>__ > wrote:
> 
> Hi,
> 
> What version of es-hadoop are you using? The problem stems from the difference in the types
> mentioned on your
> Mapper, namely the output value class:
> 
> conf.setMapOutputValueClass( ______ MapWritable.class);
> 
> to MapWritable while LinkedMapWritable is returned. The latest versions automatically detect this
> and use
> the proper
> type so I recommend upgrading.
> If that's not an option, use LinkedMapWritable.
> 
> Cheers,
> 
> P.S. Please don't post code and stracktraces on the mailing list since it highly reduces the
> readability of
> your
> email. Instead use gist or any other service
> to post the code as indicated in the docs [1]. Thanks
> 
> [1]
> http://www.elasticsearch.org/ ______guide/en/elasticsearch/____ hadoop/ __2.1.Beta/____ troubleshooting.html# ___where_____ do_i_post_my___information
> <http://www.elasticsearch.org/ ____guide/en/elasticsearch/__ hadoop/ __2.1.Beta/__ troubleshooting.html# ___where___ do_i_post_my___information>
> 
> <http://www.elasticsearch.org/ ____guide/en/elasticsearch/__ hadoop/ __2.1.Beta/__ troubleshooting.html# ___where___ do_i_post_my___information
> <http://www.elasticsearch.org/ __guide/en/elasticsearch/hadoop/__ 2.1.Beta/troubleshooting.html# ___where_do_i_post_my___ information>>
> 
> <http://www.elasticsearch.org/ ____guide/en/elasticsearch/__ hadoop/ __2.1.Beta/__ troubleshooting.html# ___where___ do_i_post_my___information
> <http://www.elasticsearch.org/ __guide/en/elasticsearch/hadoop/__ 2.1.Beta/troubleshooting.html# ___where_do_i_post_my___ information>
> 
> <http://www.elasticsearch.org/ __guide/en/elasticsearch/hadoop/__ 2.1.Beta/troubleshooting.html# ___where_do_i_post_my___ information
> <http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/2.1.Beta/troubleshooting.html#_where_do_i_post_my_information>>>
> 
> On 9/9/14 11:59 AM, gaurav redkar wrote:
> 
> Hi, I was following the example given on official elasticsearch documentation to read data from
> elasticsearch using
> hadoop but i am getting the following error.
> 
> java.lang.Exception: java.io.IOException: Type mismatch in value from map: expected
> org.apache.hadoop.io <http://org.apache.hadoop.io> <http://org.apache.hadoop.io>
> <http://org.apache.hadoop.io>. ______ MapWritable,
> received org.elasticsearch.hadoop.mr <http://org.elasticsearch.hadoop.mr>
> <http://org.elasticsearch.__hadoop.mr <http://org.elasticsearch.hadoop.mr>>
> <http://org.elasticsearch. __ha__ doop.mr <http://hadoop.mr> <http://org.elasticsearch.__hadoop.mr
> <http://org.elasticsearch.hadoop.mr>>>. ____ LinkedMapWritable
> 
> at org.apache.hadoop.mapred.______LocalJobRunner$Job.runTasks(______LocalJobRunner.java:462)
> 
> at org.apache.hadoop.mapred.______LocalJobRunner$Job.run(______LocalJobRunner.java:522)
> 
> Caused by: java.io.IOException: Type mismatch in value from map: expected org.apache.hadoop.io
> <http://org.apache.hadoop.io>
> <http://org.apache.hadoop.io>
> <http://org.apache.hadoop.io>. ______ MapWritable, received
> org.elasticsearch.hadoop.mr <http://org.elasticsearch.hadoop.mr> <http://org.elasticsearch.__hadoop.mr
> <http://org.elasticsearch.hadoop.mr>> <http://org.elasticsearch. __ha__ doop.mr <http://hadoop.mr>
> <http://org.elasticsearch. __hadoop.mr <http://org.elasticsearch.hadoop.mr>>>.____ LinkedMapWritable
> 
> at org.apache.hadoop.mapred. ______MapTask$MapOutputBuffer.______ collect(MapTask.java:1054)
> 
> at org.apache.hadoop.mapred. ______MapTask$OldOutputCollector.______ collect(MapTask.java:587)
> 
> at es2.mapper1.map(mapper1.java: ______ 29)
> 
> at org.apache.hadoop.mapred.______MapRunner.run(MapRunner.java:______54)
> 
> at org.apache.hadoop.mapred.______MapTask.runOldMapper(MapTask.______java:430)
> 
> at org.apache.hadoop.mapred. ______ MapTask.run(MapTask.java:342)
> 
> at
> org.apache.hadoop.mapred. ______LocalJobRunner$Job$______ MapTaskRunnable.run( ______ LocalJobRunner.java:243)
> 
> at java.util.concurrent. ______Executors$RunnableAdapter.______ call(Executors.java:471)
> 
> at java.util.concurrent.______FutureTask$Sync.innerRun(______FutureTask.java:334)
> 
> at java.util.concurrent.______FutureTask.run(FutureTask.______java:166)
> 
> at java.util.concurrent.______ThreadPoolExecutor.runWorker(______ThreadPoolExecutor.java:__1145)
> 
> at java.util.concurrent.______ThreadPoolExecutor$Worker.run(______ThreadPoolExecutor.java:__615)
> 
> at java.lang.Thread.run(Thread. ______ java:724)
> 
> 14/09/09 13:25:51 INFO mapreduce.Job: Job job_local994189535_0001 failed with state FAILED due
> to: NA
> 
> 14/09/09 13:25:51 INFO mapreduce.Job: Counters: 0
> 
> Exception in thread "main" java.io.IOException: Job failed!
> 
> at org.apache.hadoop.mapred.______JobClient.runJob(JobClient.______java:836)
> 
> at es2.Es2.main(Es2.java:48)
> 
> at sun.reflect. ______NativeMethodAccessorImpl.______ invoke0(Native Method)
> 
> at
> sun.reflect. ______NativeMethodAccessorImpl.______ invoke( ______NativeMethodAccessorImpl.java:______ 57)
> 
> at
> sun.reflect. ______DelegatingMethodAccessorImpl.______ invoke( ______DelegatingMethodAccessorImpl.______ java:43)
> 
> at java.lang.reflect.Method. ______ invoke(Method.java:606)
> 
> at org.apache.hadoop.util.RunJar. ______ main(RunJar.java:212)
> 
> 14/09/09 13:25:51 INFO mapred.LocalJobRunner: ShardInputSplit
> [node=[QMYbfSRMTsyXVVgfFweMkA/ ______Conceptnet|192.168.1.202:____ 9200 <http://192.168.1.202:9200>
> <http://192.168.1.202:9200>] ______ ,shard=0] > map
> 
> The code for my main runner class is as follows:-
> 
> public class Es2 {
> 
> static private final Path TMP_DIR = new Path(Es2.class.getSimpleName()
> 
> + "_TMP_1");
> 
> /**
> 
> * @param args the command line arguments
> 
> */
> 
> public static void main(String[] args) throws IOException{
> 
> //#String node="192.168.1.202";
> 
> JobConf conf = new JobConf();
> 
> conf.set("es.resource", "data/content");
> 
> conf.set("es.nodes", "192.168.1.202:9200 <http://192.168.1.202:9200>
> <http://192.168.1.202:9200> <http://192.168.1.202:9200>");
> 
> conf.set("es.query", "?q=s_start:java");
> 
> conf.setInputFormat( ______ EsInputFormat.class);
> 
> conf.setMapOutputKeyClass( ______ Text.class);
> 
> conf.setMapOutputValueClass( ______ MapWritable.class);
> 
> conf.setOutputKeyClass(Text. ______ class);
> 
> conf.setOutputValueClass( ______ MapWritable.class);
> 
> conf.setOutputFormat( ______ TextOutputFormat.class);
> 
> conf.setMapperClass(mapper1. ______ class);
> 
> final Path outDir = new Path(TMP_DIR, "out");
> 
> FileOutputFormat. ______ setOutputPath(conf, outDir);
> 
> JobClient.runJob(conf);
> 
> }
> 
> }
> 
> The code for my mapper class is as follows:-
> 
> public class mapper1 extends MapReduceBase implements
> 
> Mapper{
> 
> @Override
> 
> public void map(Object key, Object value, OutputCollector output,
> 
> Reporter reporter) throws IOException {
> 
> Text docId = (Text) key;
> 
> MapWritable doc = (MapWritable) value;
> 
> output.collect(docId,doc);
> 
> }
> 
> }
> 
> Kindly guide me on this issue.
> 
> 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@ __go____ oglegroups.com <http://go__oglegroups.com>
> <http://googlegroups.com>
> <mailto:elasticsearch% ____ 2Bunsubscribe@googlegroups.com
> <mailto:elasticsearch%25__2Bunsubscribe@googlegroups.com>
> <mailto:elasticsearch% __252Bunsubscribe@googlegroups.__ com
> <mailto:elasticsearch%25252Bunsubscribe@googlegroups.com>>__>
> <mailto:elasticsearch+ ______ unsubscribe@googlegroups.com
> <mailto:elasticsearch%2B ____ unsubscribe@googlegroups.com>
> <mailto:elasticsearch%2B ____ unsubscribe@googlegroups.com
> <mailto:elasticsearch%252B__unsubscribe@googlegroups.com>>
> <mailto:elasticsearch% ____2Bunsubscribe@googlegroups.com <mailto:elasticsearch%25__ 2Bunsubscribe@googlegroups.com>
> <mailto:elasticsearch% __252Bunsubscribe@googlegroups.__ com
> <mailto:elasticsearch%25252Bunsubscribe@googlegroups.com>>__>>.
> To view this discussion on the web visit
> https://groups.google.com/d/ ______msgid/elasticsearch/__ 3b110c43- ____faa8-4a08-acfa-__ 0fac5fd89585% ______ 40googlegroups.com
> <https://groups.google.com/d/ ____msgid/elasticsearch/3b110c43-____ faa8-4a08-acfa-0fac5fd89585% ____ 40googlegroups.com>
> 
> <https://groups.google.com/d/ ____msgid/elasticsearch/3b110c43-____ faa8-4a08-acfa-0fac5fd89585% ____ 40googlegroups.com
> <https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585%__40googlegroups.com>>
> 
> <https://groups.google.com/d/ ____msgid/elasticsearch/3b110c43-____ faa8-4a08-acfa-0fac5fd89585% ____ 40googlegroups.com
> <https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585%__40googlegroups.com>
> 
> <https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585%__40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/3b110c43-faa8-4a08-acfa-0fac5fd89585%40googlegroups.com>>>
> 
> <https://groups.google.com/d/ ______msgid/elasticsearch/__ 3b110c43- ____faa8-4a08-acfa-__ 0fac5fd89585% ______40googlegroups.com?utm_____ medium= __email&utm_source=____ footer
> <https://groups.google.com/d/ ____msgid/elasticsearch/3b110c43-____ faa8-4a08-acfa-0fac5fd89585% ____40googlegroups.com?utm___ medium= __email&utm_source=__ footer>
> 
> <https://groups.google.com/d/ ____msgid/elasticsearch/3b110c43-____ faa8-4a08-acfa-0fac5fd89585% ____40googlegroups.com?utm___ medium= __email&utm_source=__ footer
> <https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585% __40googlegroups.com?utm_medium=__ email&utm_source=footer>>
> 
> <https://groups.google.com/d/ ____msgid/elasticsearch/3b110c43-____ faa8-4a08-acfa-0fac5fd89585% ____40googlegroups.com?utm___ medium= __email&utm_source=__ footer
> <https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585% __40googlegroups.com?utm_medium=__ email&utm_source=footer>
> 
> <https://groups.google.com/d/ __msgid/elasticsearch/3b110c43-__ faa8-4a08-acfa-0fac5fd89585% __40googlegroups.com?utm_medium=__ email&utm_source=footer
> <https://groups.google.com/d/msgid/elasticsearch/3b110c43-faa8-4a08-acfa-0fac5fd89585%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>>
> <https://groups.google.com/d/ ____optout <https://groups.google.com/d/__ optout>
> <https://groups.google.com/d/__optout <https://groups.google.com/d/optout>>>.
> 
> --
> Costin
> 
> --
> 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/HS1A_______ psM7fw/unsubscribe
> <https://groups.google.com/d/ ____topic/elasticsearch/HS1A_____ psM7fw/unsubscribe>
> <https://groups.google.com/d/ ____topic/elasticsearch/HS1A_____ psM7fw/unsubscribe
> <https://groups.google.com/d/ __topic/elasticsearch/HS1A___ psM7fw/unsubscribe>>
> <https://groups.google.com/d/ ____topic/elasticsearch/HS1A_____ psM7fw/unsubscribe
> <https://groups.google.com/d/ __topic/elasticsearch/HS1A___ psM7fw/unsubscribe>
> <https://groups.google.com/d/ __topic/elasticsearch/HS1A___ psM7fw/unsubscribe
> <https://groups.google.com/d/topic/elasticsearch/HS1A_psM7fw/unsubscribe>>>.
> To unsubscribe from this group and all its topics, send an email to
> elasticsearch+unsubscribe@ __go____ oglegroups.com <http://go__oglegroups.com> <http://googlegroups.com>
> <mailto:elasticsearch% ____ 2Bunsubscribe@googlegroups.com
> <mailto:elasticsearch%25__2Bunsubscribe@googlegroups.com>
> <mailto:elasticsearch% __252Bunsubscribe@googlegroups.__ com
> <mailto:elasticsearch%25252Bunsubscribe@googlegroups.com>>__>.
> To view this discussion on the web visit
> https://groups.google.com/d/ ______msgid/elasticsearch/__ 540ED720. ____5040501%40gmail.__ com
> <https://groups.google.com/d/ ____msgid/elasticsearch/540ED720.____ 5040501%40gmail.com>
> <https://groups.google.com/d/ ____msgid/elasticsearch/540ED720.____ 5040501%40gmail.com
> <https://groups.google.com/d/ __msgid/elasticsearch/540ED720.__ 5040501%40gmail.com>>
> <https://groups.google.com/d/ ____msgid/elasticsearch/540ED720.____ 5040501%40gmail.com
> <https://groups.google.com/d/ __msgid/elasticsearch/540ED720.__ 5040501%40gmail.com>
> <https://groups.google.com/d/ __msgid/elasticsearch/540ED720.__ 5040501%40gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/540ED720.5040501%40gmail.com>>>.
> 
> 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>>
> <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@ __go__ oglegroups.com <http://googlegroups.com>
> <mailto:elasticsearch% __2Bunsubscribe@googlegroups.com <mailto:elasticsearch%252Bunsubscribe@googlegroups.com>__ >
> <mailto:elasticsearch+ ____ unsubscribe@googlegroups.com
> <mailto:elasticsearch%2B __unsubscribe@googlegroups.com> <mailto:elasticsearch%__ 2Bunsubscribe@googlegroups.com
> <mailto:elasticsearch%252Bunsubscribe@googlegroups.com>__>>.
> To view this discussion on the web visit
> https://groups.google.com/d/ ____msgid/elasticsearch/CAJ1vTBJ%____ 2BgBi6oUwbfxJSrvjXWpu _____FzhJ4T3BbSQ%2BNA-iE_NtHA%____ 40mail.gmail.com
> <https://groups.google.com/d/ __msgid/elasticsearch/CAJ1vTBJ%__ 2BgBi6oUwbfxJSrvjXWpu ___FzhJ4T3BbSQ%2BNA-iE_NtHA%__ 40mail.gmail.com>
> 
> <https://groups.google.com/d/ __msgid/elasticsearch/CAJ1vTBJ%__ 2BgBi6oUwbfxJSrvjXWpu ___FzhJ4T3BbSQ%2BNA-iE_NtHA%__ 40mail.gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%2BgBi6oUwbfxJSrvjXWpu_FzhJ4T3BbSQ%2BNA-iE_NtHA%40mail.gmail.com>>
> 
> <https://groups.google.com/d/ ____msgid/elasticsearch/CAJ1vTBJ%____ 2BgBi6oUwbfxJSrvjXWpu _____FzhJ4T3BbSQ%2BNA-iE_NtHA%____ 40mail.gmail.com?utm_medium= ____ email&utm_source=footer
> <https://groups.google.com/d/ __msgid/elasticsearch/CAJ1vTBJ%__ 2BgBi6oUwbfxJSrvjXWpu ___FzhJ4T3BbSQ%2BNA-iE_NtHA%__ 40mail.gmail.com?utm_medium=__email&utm_source=footer>
> 
> <https://groups.google.com/d/ __msgid/elasticsearch/CAJ1vTBJ%__ 2BgBi6oUwbfxJSrvjXWpu ___FzhJ4T3BbSQ%2BNA-iE_NtHA%__ 40mail.gmail.com?utm_medium=__email&utm_source=footer
> <https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJ%2BgBi6oUwbfxJSrvjXWpu_FzhJ4T3BbSQ%2BNA-iE_NtHA%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>
> <https://groups.google.com/d/__optout <https://groups.google.com/d/optout>>.
> 
> --
> Costin
> 
> --
> 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/HS1A_____ psM7fw/unsubscribe
> <https://groups.google.com/d/ __topic/elasticsearch/HS1A___ psM7fw/unsubscribe>
> <https://groups.google.com/d/ __topic/elasticsearch/HS1A___ psM7fw/unsubscribe
> <https://groups.google.com/d/topic/elasticsearch/HS1A_psM7fw/unsubscribe>>.
> To unsubscribe from this group and all its topics, send an email to
> elasticsearch+unsubscribe@ __go__ oglegroups.com <http://googlegroups.com>
> <mailto:elasticsearch%__2Bunsubscribe@googlegroups.com
> <mailto:elasticsearch%252Bunsubscribe@googlegroups.com>__>.
> To view this discussion on the web visit
> https://groups.google.com/d/ ____msgid/elasticsearch/540EFF05.____ 6040508%40gmail.com
> <https://groups.google.com/d/ __msgid/elasticsearch/540EFF05.__ 6040508%40gmail.com>
> <https://groups.google.com/d/ __msgid/elasticsearch/540EFF05.__ 6040508%40gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/540EFF05.6040508%40gmail.com>>.
> 
> 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%2Bunsubscribe@googlegroups.com>
> <mailto:elasticsearch+__unsubscribe@googlegroups.com <mailto:elasticsearch%2Bunsubscribe@googlegroups.com>>.
> To view this discussion on the web visit
> https://groups.google.com/d/ __msgid/elasticsearch/__ CAJ1vTBKTUr11ck6rSvbzZuf% __2Bt1C_tFMiZP407kvrDK4Yfd5P%__ 3DQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBKTUr11ck6rSvbzZuf%2Bt1C_tFMiZP407kvrDK4Yfd5P%3DQ%40mail.gmail.com>
> <https://groups.google.com/d/ __msgid/elasticsearch/__ CAJ1vTBKTUr11ck6rSvbzZuf% __2Bt1C_tFMiZP407kvrDK4Yfd5P%__ 3DQ%40mail.gmail.com?utm___medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBKTUr11ck6rSvbzZuf%2Bt1C_tFMiZP407kvrDK4Yfd5P%3DQ%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>.
> 
> --
> Costin
> 
> --
> 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/HS1A___ psM7fw/unsubscribe
> <https://groups.google.com/d/topic/elasticsearch/HS1A_psM7fw/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@__googlegroups.com
> <mailto:elasticsearch%2Bunsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/ __msgid/elasticsearch/540F61E9.__ 2030303%40gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/540F61E9.2030303%40gmail.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) [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/CAJ1vTBJze%2BfmPRz52i03pmAT1F29CPA\_mUzLtfZKjN2mkaSf1Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJze%2BfmPRz52i03pmAT1F29CPA_mUzLtfZKjN2mkaSf1Q%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJze%2BfmPRz52i03pmAT1F29CPA\_mUzLtfZKjN2mkaSf1Q%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAJ1vTBJze%2BfmPRz52i03pmAT1F29CPA_mUzLtfZKjN2mkaSf1Q%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).

--  
Costin

--  
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/54114E14.6070207%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/54114E14.6070207%40gmail.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, 1:03am UTC](https://discuss.elastic.co/t/error-while-reading-elasticsearch-data-in-hadoop-program/19676/9 "2017-07-06T01:03:09Z")

</div>


