Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12271

Hadoop Jar Error Should Be More Explanatory

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When the "hadoop jar" command is used and the JAR does not exist, the error message says "Not a valid JAR: ...". The message should say that the JAR does not exist. This error makes it sound like the JAR is corrupt or is not a JAR format.

      https://github.com/apache/hadoop/blob/c1d50a91f7c05e4aaf4655380c8dcd11703ff158/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java#L151

      1. HADOOP-12271.001.patch
        0.8 kB
        Josh Elser
      2. HADOOP-12271.002.patch
        0.8 kB
        Josh Elser

        Activity

        Hide
        qwertymaniac Harsh J added a comment -

        Makes sense; Mind submitting a patch with the better message (such as could not open, etc.)?

        Show
        qwertymaniac Harsh J added a comment - Makes sense; Mind submitting a patch with the better message (such as could not open, etc.)?
        Hide
        elserj Josh Elser added a comment -

        Here's a trivial patch against trunk.

        Show
        elserj Josh Elser added a comment - Here's a trivial patch against trunk.
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 17m 25s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 tests included 0m 0s 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 javac 8m 2s There were no new javac warning messages.
        +1 javadoc 10m 12s There were no new javadoc warning messages.
        +1 release audit 0m 26s The applied patch does not increase the total number of release audit warnings.
        -1 checkstyle 1m 11s The applied patch generated 1 new checkstyle issues (total was 5, now 6).
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 24s mvn install still works.
        +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
        +1 findbugs 1m 55s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 common tests 22m 45s Tests passed in hadoop-common.
            63m 54s  



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12747909/HADOOP-12271.001.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / ddc867ce
        checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/7365/artifact/patchprocess/diffcheckstylehadoop-common.txt
        hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7365/artifact/patchprocess/testrun_hadoop-common.txt
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7365/testReport/
        Java 1.7.0_55
        uname Linux asf904.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/7365/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 17m 25s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. -1 tests included 0m 0s 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 javac 8m 2s There were no new javac warning messages. +1 javadoc 10m 12s There were no new javadoc warning messages. +1 release audit 0m 26s The applied patch does not increase the total number of release audit warnings. -1 checkstyle 1m 11s The applied patch generated 1 new checkstyle issues (total was 5, now 6). +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 24s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 1m 55s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 45s Tests passed in hadoop-common.     63m 54s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12747909/HADOOP-12271.001.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / ddc867ce checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/7365/artifact/patchprocess/diffcheckstylehadoop-common.txt hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7365/artifact/patchprocess/testrun_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7365/testReport/ Java 1.7.0_55 uname Linux asf904.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/7365/console This message was automatically generated.
        Hide
        elserj Josh Elser added a comment -

        Checkstyle nit

        Show
        elserj Josh Elser added a comment - Checkstyle nit
        Hide
        qwertymaniac Harsh J added a comment -

        Looks good to me (thanks for addressing the length nit), committing shortly.

        Show
        qwertymaniac Harsh J added a comment - Looks good to me (thanks for addressing the length nit), committing shortly.
        Hide
        qwertymaniac Harsh J added a comment -

        Committed to trunk and branch-2. Many thanks for the contribution Josh!

        Show
        qwertymaniac Harsh J added a comment - Committed to trunk and branch-2. Many thanks for the contribution Josh!
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8248 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8248/)
        HADOOP-12271. Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8248 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8248/ ) HADOOP-12271 . Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #273 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/273/)
        HADOOP-12271. Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #273 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/273/ ) HADOOP-12271 . Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk #1003 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1003/)
        HADOOP-12271. Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #1003 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1003/ ) HADOOP-12271 . Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #262 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/262/)
        HADOOP-12271. Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #262 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/262/ ) HADOOP-12271 . Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2219 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2219/)
        HADOOP-12271. Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2219 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2219/ ) HADOOP-12271 . Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2200 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2200/)
        HADOOP-12271. Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2200 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2200/ ) HADOOP-12271 . Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
        Hide
        elserj Josh Elser added a comment -

        Thanks for pulling it in, Harsh J!

        Show
        elserj Josh Elser added a comment - Thanks for pulling it in, Harsh J !
        Hide
        eljefe6aa Jesse Anderson added a comment -

        Thanks to both of you for the fix and commit.

        Show
        eljefe6aa Jesse Anderson added a comment - Thanks to both of you for the fix and commit.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #270 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/270/)
        HADOOP-12271. Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #270 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/270/ ) HADOOP-12271 . Hadoop Jar Error Should Be More Explanatory. Contributed by Josh Elser. (harsh: rev 2087eaf684d9fb14b5390e21bf17e93ac8fea7f8) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java hadoop-common-project/hadoop-common/CHANGES.txt

          People

          • Assignee:
            elserj Josh Elser
            Reporter:
            eljefe6aa Jesse Anderson
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development