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

Remove hardcoded absolute path for shell executable

    Details

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

      Description

      Shell.java has a hardcoded path to /bin/bash which is not correct on all platforms.

      Pointed out by Allen Wittenauer while reviewing HADOOP-13434.

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #10236 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10236/)
          HADOOP-13457. Remove hardcoded absolute path for shell executable. (Chen (arp: rev 58e1523c8ea1363ea8ab115fb718227a90bfab87)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #10236 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10236/ ) HADOOP-13457 . Remove hardcoded absolute path for shell executable. (Chen (arp: rev 58e1523c8ea1363ea8ab115fb718227a90bfab87) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
          Hide
          arpitagarwal Arpit Agarwal added a comment -

          I've committed this for 2.8.0. Thanks for the contribution Chen Liang.

          Good catch on /bin/ls. If it needs a fix we can do so in a separate Jira.

          Show
          arpitagarwal Arpit Agarwal added a comment - I've committed this for 2.8.0. Thanks for the contribution Chen Liang . Good catch on /bin/ls . If it needs a fix we can do so in a separate Jira.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 15s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 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 mvninstall 8m 36s trunk passed
          +1 compile 8m 40s trunk passed
          +1 checkstyle 0m 26s trunk passed
          +1 mvnsite 1m 9s trunk passed
          +1 mvneclipse 0m 15s trunk passed
          +1 findbugs 1m 34s trunk passed
          +1 javadoc 0m 54s trunk passed
          +1 mvninstall 0m 44s the patch passed
          +1 compile 8m 25s the patch passed
          +1 javac 8m 25s the patch passed
          +1 checkstyle 0m 30s the patch passed
          +1 mvnsite 1m 3s the patch passed
          +1 mvneclipse 0m 12s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 31s the patch passed
          +1 javadoc 0m 52s the patch passed
          +1 unit 7m 13s hadoop-common in the patch passed.
          +1 asflicense 0m 22s The patch does not generate ASF License warnings.
          44m 19s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12822625/HADOOP-13457.001.patch
          JIRA Issue HADOOP-13457
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 3a29886024de 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
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 6255859
          Default Java 1.8.0_101
          findbugs v3.0.0
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10202/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10202/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 15s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 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 mvninstall 8m 36s trunk passed +1 compile 8m 40s trunk passed +1 checkstyle 0m 26s trunk passed +1 mvnsite 1m 9s trunk passed +1 mvneclipse 0m 15s trunk passed +1 findbugs 1m 34s trunk passed +1 javadoc 0m 54s trunk passed +1 mvninstall 0m 44s the patch passed +1 compile 8m 25s the patch passed +1 javac 8m 25s the patch passed +1 checkstyle 0m 30s the patch passed +1 mvnsite 1m 3s the patch passed +1 mvneclipse 0m 12s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 31s the patch passed +1 javadoc 0m 52s the patch passed +1 unit 7m 13s hadoop-common in the patch passed. +1 asflicense 0m 22s The patch does not generate ASF License warnings. 44m 19s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12822625/HADOOP-13457.001.patch JIRA Issue HADOOP-13457 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 3a29886024de 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 Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 6255859 Default Java 1.8.0_101 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10202/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10202/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          vagarychen Chen Liang added a comment -

          I also noticed there is "/bin/ls" in the same file, should this be changed to "ls" just like bash command? (i.e. is "ls" command also platform-dependent?) Allen Wittenauer Do you have any comments on this?

          Thanks

          Show
          vagarychen Chen Liang added a comment - I also noticed there is "/bin/ls" in the same file, should this be changed to "ls" just like bash command? (i.e. is "ls" command also platform-dependent?) Allen Wittenauer Do you have any comments on this? Thanks
          Hide
          arpitagarwal Arpit Agarwal added a comment -

          +1 pending Jenkins.

          Show
          arpitagarwal Arpit Agarwal added a comment - +1 pending Jenkins.

            People

            • Assignee:
              vagarychen Chen Liang
              Reporter:
              arpitagarwal Arpit Agarwal
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development