You are using the wrong version of elasticserach-hadoop. Double check the docs 
[1].


P.S. I recommend upgrading to the latest ES 0.90 (or 1.1.0 even). And if possible, using the latest snapshot of master - downloadable through maven [2] (note there's no need for using the yarn classifier in that case, there's only one jar that works across both Hadoop 1 and 2).

Cheers,

[1] 
http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/index.html
[2] 
http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/install.html

On 4/3/14 12:36 PM, Chetana wrote:
I have downloaded elasticsearch-hadoop-1.2.0.jar from github and trying to 
search. The code to search looks like
*********
Configuration conf = new Configuration();
   conf.set("es.nodes", "localhost");
   conf.set("es.port", "9200");
   conf.set("es.resource", "test_index/test_mapping");
   conf.set("es.query", "{\"query\":{\"term\":{\"test.field1\":\"test\"}}}");
   Job job = Job.getInstance(conf);
   job.setJobName(ESIndexContoller.class.getSimpleName());
      job.setJarByClass(ESIndexContoller.class);

   job.setInputFormatClass(EsInputFormat.class);
   job.setOutputFormatClass(EsOutputFormat.class);
         job.setOutputKeyClass(Text.class);
         job.setOutputValueClass(MapWritable.class);
         job.setSpeculativeExecution(false);
         job.waitForCompletion(true);
********
I have hadoop 2.2 from hortonworks and ES 0.90.2. But when I run 'hadoop jar' 
command it throws 'IllegalStateException:
Job in state DEFINE instead of RUNNING'
I believe one needs to create custom Mapper and Reducer. If so, can someone 
tell me how the code should look like inside
map() and reduce()
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
[email protected] 
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/c70d3f45-27a7-4f38-9615-7cce19c956c4%40googlegroups.com
<https://groups.google.com/d/msgid/elasticsearch/c70d3f45-27a7-4f38-9615-7cce19c956c4%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/533D2DD7.4030802%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to