[Solved-4 Solutions] Error in pig while loading data ?
The following error came while loading data:
How to handle this ? The following error came while loading data:
- Apache Pig 0.12.0 expects an older version of Hadoop by default. we must recompile Pig for Hadoop 2.2.0 and replace two jars with new pig-0.12.1-SNAPSHOT.jar and pig-0.12.1-SNAPSHOT-withouthadoop.jar.
- For recompilation unpack the pig archive, go to the directory "pig-0.12.0 and just run:
- The same problem on CDH4.4 & Pig 0.11.0 when Pig script was invoking a UDF from java project which was compiled using Maven. we visited /usr/lib/pig/conf/build.properties file.
- Verified the versions mentioned against hadoop-core, hadoop-common, hadoop-mapreduce properties. Ensured that all these artifacts with same versions are included as dependencies in my java project's POM.xml file.
- After building my project's jar file with these POM settings, Pig script was able to invoke UDF without any problem.
- Just building with command "ant clean jar-all - Dhadoopversion=23" is not enough if we are using maven dependencies in your project. Its need to install the jar created by this in local maven repo or use this dependency (notice "classifier" tag for hadoop2) in your pom.xml
- Just caught the same exception, trying to run script with my UDF on Hadoop 2x.
- In latest release 0.14 and current trunk 0.15, ant target jar-all is missing. So if we are building from sources, we can use