M_20, I've already replied to your initial query on where you can find some
example - the official docs:
http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/mapreduce.html
There's also google which points to other resources outside Elasticsearch.



On Fri, Jul 25, 2014 at 11:10 PM, M_20 <rastegar...@gmail.com> wrote:

> Hi Chetana,
>
> Could you please share with me a java sample code of Map/reduce on
> Elastcisearch-Hadoop?
>
> Regards
>
>
> On Thursday, April 3, 2014 4:36:24 AM UTC-5, 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 elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/c54ca61b-26d8-4cad-91ee-80552ae13116%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/c54ca61b-26d8-4cad-91ee-80552ae13116%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAJogdmefELVCohXiJQJOJFyPHfEw%3DPYSLivA9ULrKHd6TxGC4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to