Created
April 12, 2014 19:36
-
-
Save Foolius/10552798 to your computer and use it in GitHub Desktop.
pig + ES problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index.pig: | |
register /home/foo/elasticsearch-hadoop-1.3.0.M3/dist/elasticsearch-hadoop-pig-1.3.0.M3.jar | |
a = load '$files' using PigStorage() as (json:chararray); | |
store a into '$index' using org.elasticsearch.hadoop.pig.EsStorage('es.input.json=true','es.nodes=hadoop.bla:9200'); | |
$ pig -param files=`cat filelist | tr "\n" "," | sed -e 's/,$//'` -param index=hadooptest/t -f index.pig | |
Pig Stack Trace | |
--------------- | |
ERROR 2998: Unhandled internal error. Found interface org.apache.hadoop.mapreduce.JobContext, but class was expected | |
java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.JobContext, but class was expected | |
at org.elasticsearch.hadoop.mr.EsOutputFormat.checkOutputSpecs(EsOutputFormat.java:311) | |
at org.apache.pig.newplan.logical.rules.InputOutputFileValidator$InputOutputFileVisitor.visit(InputOutputFileValidator.java:80) | |
at org.apache.pig.newplan.logical.relational.LOStore.accept(LOStore.java:66) | |
at org.apache.pig.newplan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:64) | |
at org.apache.pig.newplan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:66) | |
at org.apache.pig.newplan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:66) | |
at org.apache.pig.newplan.DepthFirstWalker.walk(DepthFirstWalker.java:53) | |
at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:52) | |
at org.apache.pig.newplan.logical.rules.InputOutputFileValidator.validate(InputOutputFileValidator.java:45) | |
at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.compile(HExecutionEngine.java:285) | |
at org.apache.pig.PigServer.compilePp(PigServer.java:1324) | |
at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1249) | |
at org.apache.pig.PigServer.execute(PigServer.java:1241) | |
at org.apache.pig.PigServer.executeBatch(PigServer.java:335) | |
at org.apache.pig.tools.grunt.GruntParser.executeBatch(GruntParser.java:137) | |
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:198) | |
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170) | |
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84) | |
at org.apache.pig.Main.run(Main.java:475) | |
at org.apache.pig.Main.main(Main.java:157) | |
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:208) | |
================================================================================ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment