Hadoop Common
  1. Hadoop Common
  2. HADOOP-8951

RunJar to fail with user-comprehensible error message if jar missing

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0, 2.0.2-alpha
    • Fix Version/s: 1.2.0, 2.0.3-alpha
    • Component/s: util
    • Labels:
      None

      Description

      When the RunJar JAR is missing or not a file, exit with a meaningful message.

      1. HADOOP-8951.patch
        0.8 kB
        Steve Loughran

        Issue Links

          Activity

          Hide
          Eli Collins added a comment -

          I'd use the following in case this is ever called from tests:

          ExitUtil#terminate(0, "Not a valid JAR: " + file.getCanonicalPath());
          
          Show
          Eli Collins added a comment - I'd use the following in case this is ever called from tests: ExitUtil#terminate(0, "Not a valid JAR: " + file.getCanonicalPath());
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #1234 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1234/)
          Moved HADOOP-8951 from trunk to release 2.0.3 section in CHANGES.txt (Revision 1400929)
          HADOOP-8951. RunJar to fail with user-comprehensible error message if jar missing. Contributed by Steve Loughran. (Revision 1400921)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400929
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt

          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400921
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1234 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1234/ ) Moved HADOOP-8951 from trunk to release 2.0.3 section in CHANGES.txt (Revision 1400929) HADOOP-8951 . RunJar to fail with user-comprehensible error message if jar missing. Contributed by Steve Loughran. (Revision 1400921) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400929 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400921 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1204 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1204/)
          Moved HADOOP-8951 from trunk to release 2.0.3 section in CHANGES.txt (Revision 1400929)
          HADOOP-8951. RunJar to fail with user-comprehensible error message if jar missing. Contributed by Steve Loughran. (Revision 1400921)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400929
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt

          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400921
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1204 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1204/ ) Moved HADOOP-8951 from trunk to release 2.0.3 section in CHANGES.txt (Revision 1400929) HADOOP-8951 . RunJar to fail with user-comprehensible error message if jar missing. Contributed by Steve Loughran. (Revision 1400921) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400929 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400921 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Yarn-trunk #12 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/12/)
          Moved HADOOP-8951 from trunk to release 2.0.3 section in CHANGES.txt (Revision 1400929)
          HADOOP-8951. RunJar to fail with user-comprehensible error message if jar missing. Contributed by Steve Loughran. (Revision 1400921)

          Result = FAILURE
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400929
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt

          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400921
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
          Show
          Hudson added a comment - Integrated in Hadoop-Yarn-trunk #12 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/12/ ) Moved HADOOP-8951 from trunk to release 2.0.3 section in CHANGES.txt (Revision 1400929) HADOOP-8951 . RunJar to fail with user-comprehensible error message if jar missing. Contributed by Steve Loughran. (Revision 1400921) Result = FAILURE suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400929 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400921 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-trunk-Commit #2906 (See https://builds.apache.org/job/Hadoop-trunk-Commit/2906/)
          Moved HADOOP-8951 from trunk to release 2.0.3 section in CHANGES.txt (Revision 1400929)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400929
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          Hudson added a comment - Integrated in Hadoop-trunk-Commit #2906 (See https://builds.apache.org/job/Hadoop-trunk-Commit/2906/ ) Moved HADOOP-8951 from trunk to release 2.0.3 section in CHANGES.txt (Revision 1400929) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400929 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          Suresh Srinivas added a comment -

          I committed the patch to trunk, branch-2 and branch-1. Thank you Steve.

          Show
          Suresh Srinivas added a comment - I committed the patch to trunk, branch-2 and branch-1. Thank you Steve.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-trunk-Commit #2905 (See https://builds.apache.org/job/Hadoop-trunk-Commit/2905/)
          HADOOP-8951. RunJar to fail with user-comprehensible error message if jar missing. Contributed by Steve Loughran. (Revision 1400921)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400921
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
          Show
          Hudson added a comment - Integrated in Hadoop-trunk-Commit #2905 (See https://builds.apache.org/job/Hadoop-trunk-Commit/2905/ ) HADOOP-8951 . RunJar to fail with user-comprehensible error message if jar missing. Contributed by Steve Loughran. (Revision 1400921) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1400921 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java
          Hide
          Suresh Srinivas added a comment -

          +1 for the patch

          Show
          Suresh Srinivas added a comment - +1 for the patch
          Hide
          Hadoop QA added a comment -

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

          +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 javac. The applied patch does not increase the total number of javac compiler warnings.

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

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

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

          +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1658//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1658//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/12550287/HADOOP-8951.patch against trunk revision . +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 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1658//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1658//console This message is automatically generated.
          Hide
          Steve Loughran added a comment -

          no tests; it calls System.exit()

          Show
          Steve Loughran added a comment - no tests; it calls System.exit()
          Hide
          Steve Loughran added a comment -

          HADOOP-8950 shows that a stack trace showing unzip failed isn't immediately meaningful to people who aren't used to reading stack traces.

          I propose having a sanity check that looks for the arg[1] file existing and having the isFile() nature; exiting with text and an error if not.

          Show
          Steve Loughran added a comment - HADOOP-8950 shows that a stack trace showing unzip failed isn't immediately meaningful to people who aren't used to reading stack traces. I propose having a sanity check that looks for the arg [1] file existing and having the isFile() nature; exiting with text and an error if not.

            People

            • Assignee:
              Steve Loughran
              Reporter:
              Steve Loughran
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development