-
Notifications
You must be signed in to change notification settings - Fork 999
Description
I have created a normal Pig script to test if i can get a data from elasticsearch. Below is my small pig script. I am using elasticsearch-1.6.0, pig-0.15.0 and elasticsearch-hadoop-2.1.0
REGISTER /Users/kunalgupta/Desktop/Backup/Kunal/Downloads/elasticsearch-hadoop-2.1.0/dist/elasticsearch-hadoop-2.1.0.jar;
DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage();
A = LOAD 'test/test' USING EsStorage('es.query=?me*');
dump A;
In ElasticSearch there is a index named as test with doc_type test.
I am running pig shell in MapReduce mode with hadoop version 2.6.0, when i run the pig script i got a failed error of
ERROR org.apache.pig.tools.pigstats.PigStats - ERROR 0: org.apache.pig.backend.executionengine.ExecException: ERROR 2997: Unable to recreate exception from backed error: Error: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
I think TaskAttempContext is a class in Hadoop 1.X not in 2.X, it is an interface in Hadoop 2.X
But when i have tested on storing a result of pig script in elastcisearch then i am successful in doing it.
Can anyone help me out exactly what i am missing here.
Please fix it soon.