apache pig - Making Pig 0.12 work with hadoop 2.2.0 -
i have hadoop 2.2.0 running on remote cluster , pig 0.12 on separate machine. need make pig communicate hadoop , first steps seems to build pig 0.12 hadoop 2.2.0. here did:
- in ivy/libraries.properties changed hadoop-core.version, hadoop-common.version, hadoop-hdfs.version, hadoop-mapreduce.version 2.2.0.
- in ivy.xml replaced hadoop-core dependency hadoop-client dependency.
- build pig using "ant clean jar-all -dhadoopversion=23"
when run "pig" command line following error:
error 2998: unhandled internal error. org/apache/hadoop/hdfs/distributedfilesystem java.lang.noclassdeffounderror: org/apache/hadoop/hdfs/distributedfilesystem @ org.apache.pig.backend.hadoop.executionengine.hexecutionengine.init(hexecutionengine.java:173) @ org.apache.pig.backend.hadoop.executionengine.hexecutionengine.init(hexecutionengine.java:122) @ org.apache.pig.impl.pigcontext.connect(pigcontext.java:301) @ org.apache.pig.pigserver.<init>(pigserver.java:222) @ org.apache.pig.pigserver.<init>(pigserver.java:207) @ org.apache.pig.tools.grunt.grunt.<init>(grunt.java:47) @ org.apache.pig.main.run(main.java:538) @ org.apache.pig.main.main(main.java:156) caused by: java.lang.classnotfoundexception: org.apache.hadoop.hdfs.distributedfilesystem @ java.net.urlclassloader$1.run(urlclassloader.java:202) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:190) @ java.lang.classloader.loadclass(classloader.java:306) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:301) @ java.lang.classloader.loadclass(classloader.java:247)
just building command ant clean jar-all -dhadoopversion=23
or ant jar-withouthadoop –dhadoopversion=23
not enough if using maven dependencies in project. need install jar created in local maven repo or use dependency (notice "classifier" tag hadoop2) in pom.xml
<dependency> <groupid>org.apache.pig</groupid> <artifactid>pig</artifactid> <version>0.13.0</version> <classifier>h2</classifier> </dependency>
Comments
Post a Comment