Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-852

ExampleDriver is incorrectly set as a Main-Class in tools in build.xml

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: build
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Changed the target name from "tools-jar" to "tools" in build.xml.

      Description

      In build.xml,

        <target name="examples" depends="jar, compile-examples" description="Make the Hadoop examples jar.">
      ...
      
        <target name="tools-jar" depends="jar, compile-tools" 
                description="Make the Hadoop tools jar.">
          <jar jarfile="${build.dir}/${tools.final.name}.jar"
               basedir="${build.tools}">
            <manifest>
              <attribute name="Main-Class" 
                         value="org/apache/hadoop/examples/ExampleDriver"/>
            </manifest>
          </jar>
        </target>
      
      • ExampleDriver should not be a Main-Class of tools
      • Should we rename the target name from "tools-jar" to "tools", so that the name would be consistent with the "examples" target?
      1. m852_20090812.patch
        2 kB
        Tsz Wo Nicholas Sze

        Activity

        Hide
        Chris Douglas added a comment -

        Whoops, that was on a dev branch. My mistake; please disregard

        Show
        Chris Douglas added a comment - Whoops, that was on a dev branch. My mistake; please disregard
        Hide
        Chris Douglas added a comment -

        This didn't remove the reference to tools-jar from compile-contrib

        Show
        Chris Douglas added a comment - This didn't remove the reference to tools-jar from compile-contrib
        Hide
        Tsz Wo Nicholas Sze added a comment -

        I have committed this.

        Show
        Tsz Wo Nicholas Sze added a comment - I have committed this.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        Actually, this is not an incompatible change since MAPREDUCE is a new sub-project, which is not yet released.

        Show
        Tsz Wo Nicholas Sze added a comment - Actually, this is not an incompatible change since MAPREDUCE is a new sub-project, which is not yet released.
        Hide
        Chris Douglas added a comment -

        +1

        Show
        Chris Douglas added a comment - +1
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12416346/m852_20090812.patch
        against trunk revision 804284.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed core unit tests.

        -1 contrib tests. The patch failed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/476/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/476/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/476/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/476/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12416346/m852_20090812.patch against trunk revision 804284. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/476/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/476/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/476/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/476/console This message is automatically generated.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        Before the patch, there is a NoClassDefFoundError.

        bash-3.2$ java -jar build/hadoop-mapred-tools-0.21.0-dev.jar 
        java.lang.NoClassDefFoundError: org/apache/hadoop/examples/ExampleDriver
        Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.examples.ExampleDriver
                at java.net.URLClassLoader$1.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(Unknown Source)
                at java.lang.ClassLoader.loadClass(Unknown Source)
                at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
                at java.lang.ClassLoader.loadClass(Unknown Source)
                at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        Could not find the main class: org/apache/hadoop/examples/ExampleDriver. Program will exit.
        

        Tested "ant tools" locally with the patch.

        Show
        Tsz Wo Nicholas Sze added a comment - Before the patch, there is a NoClassDefFoundError. bash-3.2$ java -jar build/hadoop-mapred-tools-0.21.0-dev.jar java.lang.NoClassDefFoundError: org/apache/hadoop/examples/ExampleDriver Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.examples.ExampleDriver at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) Could not find the main class: org/apache/hadoop/examples/ExampleDriver. Program will exit. Tested "ant tools" locally with the patch.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        m852_20090812.patch: renamed tools-jar to tools and removed ExampleDriver from tools.

        Show
        Tsz Wo Nicholas Sze added a comment - m852_20090812.patch: renamed tools-jar to tools and removed ExampleDriver from tools.

          People

          • Assignee:
            Tsz Wo Nicholas Sze
            Reporter:
            Tsz Wo Nicholas Sze
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development