Re: Error while reading elasticsearch data in hadoop program

2014-09-11 Thread gaurav redkar
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

Re: Error while reading elasticsearch data in hadoop program

2014-09-11 Thread Costin Leau
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

Error while reading elasticsearch data in hadoop program

2014-09-09 Thread gaurav redkar
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

Re: Error while reading elasticsearch data in hadoop program

2014-09-09 Thread gaurav redkar
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.

Re: Error while reading elasticsearch data in hadoop program

2014-09-09 Thread Costin Leau
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,

Re: Error while reading elasticsearch data in hadoop program

2014-09-09 Thread gaurav redkar
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

Re: Error while reading elasticsearch data in hadoop program

2014-09-09 Thread Costin Leau
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]