[ https://issues.apache.org/jira/browse/PIG-2362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gianmarco De Francisci Morales updated PIG-2362: ------------------------------------------------ Attachment: PIG-2362.6.patch On trunk, if I compile with -Dhadoopversion=23 and I launch bin/pig -x local I get the following error repeated continuously: {code} 2012-09-17 22:44:54,287 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2998: Unhandled internal error. Could not initialize class org.apache.pig.tools.pigstats.PigStatsUtil Details at logfile: /Users/gdfm/workspace/pig/git/pig_1347914693509.log {code} Here the stack trace: {code} Pig Stack Trace --------------- ERROR 2998: Unhandled internal error. org/apache/hadoop/mapreduce/task/JobContextImpl java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/task/JobContextImpl at org.apache.pig.tools.pigstats.PigStatsUtil.<clinit>(PigStatsUtil.java:54) at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:67) at org.apache.pig.Main.run(Main.java:538) at org.apache.pig.Main.main(Main.java:154) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:156) Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.mapreduce.task.JobContextImpl at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 9 more ================================================================================ Pig Stack Trace --------------- ERROR 2998: Unhandled internal error. Could not initialize class org.apache.pig.tools.pigstats.PigStatsUtil {code} So I am unable to test if the new build works with Hadoop 23. This patch produces a new file, pig-core.jar, in the top level directory. pig-core.jar is just a copy of pig-0.11.0-SNAPSHOT.jar in build/. This is done just for convenience. Once we get rid of compatibility we can remove all the pig jars from the top level directory. > Rework Ant build.xml to use macrodef instead of antcall > ------------------------------------------------------- > > Key: PIG-2362 > URL: https://issues.apache.org/jira/browse/PIG-2362 > Project: Pig > Issue Type: Improvement > Reporter: Gianmarco De Francisci Morales > Assignee: Gianmarco De Francisci Morales > Priority: Minor > Fix For: 0.11 > > Attachments: PIG-2362.1.patch, PIG-2362.2.patch, PIG-2362.3.patch, > PIG-2362.4.patch, PIG-2362.5.patch, PIG-2362.6.patch > > > Antcall is evil: http://www.build-doctor.com/2008/03/13/antcall-is-evil/ > We'd better use macrodef and let Ant build a clean dependency graph. > http://ant.apache.org/manual/Tasks/macrodef.html > Right now we do like this: > {code} > <target name="buildAllJars"> > <antcall target="buildJar"> > <param name="build.dir" value="jar-A"/> > </antcall> > <antcall target="buildJar"> > <param name="build.dir" value="jar-B"/> > </antcall> > <antcall target="buildJar"> > <param name="build.dir" value="jar-C"/> > </antcall> > </target> > <target name="buildJar"> > <jar destfile="target/${build.dir}.jar" basedir="${build.dir}/classfiles"/> > </target> > {code} > But it would be better if we did like this: > {code} > <target name="buildAllJars"> > <buildJar build.dir="jar-A"/> > <buildJar build.dir="jar-B"/> > <buildJar build.dir="jar-C"/> > </target> > <macrodef name="buildJar"> > <attribute name="build.dir"/> > <jar destfile="target/${build.dir}.jar" basedir="${build.dir}/classfiles"/> > </macrodef> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira