Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: scripts
    • Labels:
      None
    • Environment:

      Mac OSX with both JDK_1.7.0_67 and JDK_1.8.0_20 installed.

      Description

      Running start-dfs.sh script should pick the java specified by JAVA_HOME which is defined in my /.zshrc and /.bashrc.

      My JAVA_HOME is

       $ echo $JAVA_HOME
      /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
      

      However, when I start a local cluster using start-dfs.sh, it reports

      JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
      2014-08-29 14:48:20,767 INFO  [main] namenode.NameNode (StringUtils.java:startupShutdownMessage(633)) - STARTUP_MSG:
      .....
      
      STARTUP_MSG:   java = 1.8.0_20
      

      It is expected to use JDK 7 instead. This bug only occurs on trunk, but not branch-2.

      1. HADOOP-11033.patch
        0.9 kB
        Allen Wittenauer

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #1885 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1885/)
          HADOOP-11033. shell scripts ignore JAVA_HOME on OS X. (aw) (aw: rev 0340206a29ec21d9996e7f37c905d200e5485777)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #1885 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1885/ ) HADOOP-11033 . shell scripts ignore JAVA_HOME on OS X. (aw) (aw: rev 0340206a29ec21d9996e7f37c905d200e5485777) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Hdfs-trunk #1860 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1860/)
          HADOOP-11033. shell scripts ignore JAVA_HOME on OS X. (aw) (aw: rev 0340206a29ec21d9996e7f37c905d200e5485777)

          • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk #1860 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1860/ ) HADOOP-11033 . shell scripts ignore JAVA_HOME on OS X. (aw) (aw: rev 0340206a29ec21d9996e7f37c905d200e5485777) hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Yarn-trunk #669 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/669/)
          HADOOP-11033. shell scripts ignore JAVA_HOME on OS X. (aw) (aw: rev 0340206a29ec21d9996e7f37c905d200e5485777)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #669 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/669/ ) HADOOP-11033 . shell scripts ignore JAVA_HOME on OS X. (aw) (aw: rev 0340206a29ec21d9996e7f37c905d200e5485777) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
          Hide
          eddyxu Lei (Eddy) Xu added a comment -

          Thank you very much Allen Wittenauer for the quick response!

          Show
          eddyxu Lei (Eddy) Xu added a comment - Thank you very much Allen Wittenauer for the quick response!
          Hide
          aw Allen Wittenauer added a comment -

          This is an obvious fix. Committing to trunk.

          Show
          aw Allen Wittenauer added a comment - This is an obvious fix. Committing to trunk.
          Hide
          hadoopqa Hadoop QA added a comment -

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

          +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. There were no new javadoc warning messages.

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

          +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) 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/4602//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/4602//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12665455/HADOOP-11033.patch against trunk revision 93010fa. +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 . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) 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/4602//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/4602//console This message is automatically generated.
          Hide
          aw Allen Wittenauer added a comment -

          I like these easy ones.

          Show
          aw Allen Wittenauer added a comment - I like these easy ones.
          Hide
          eddyxu Lei (Eddy) Xu added a comment -

          Allen Wittenauer Thanks for helping this out. I've tried your patch and it works on my machine.

          Show
          eddyxu Lei (Eddy) Xu added a comment - Allen Wittenauer Thanks for helping this out. I've tried your patch and it works on my machine.
          Hide
          aw Allen Wittenauer added a comment -

          Try this out.

          Show
          aw Allen Wittenauer added a comment - Try this out.
          Hide
          aw Allen Wittenauer added a comment -

          Oh, actually, no it's not. This is a new bug.

              Darwin)
                if [[ -x /usr/libexec/java_home ]]; then
                  export JAVA_HOME="$(/usr/libexec/java_home)"
                else
                  export JAVA_HOME=/Library/Java/Home
                fi
              ;;
          

          This code doesn't check if JAVA_HOME is already defined. It should.

          Show
          aw Allen Wittenauer added a comment - Oh, actually, no it's not. This is a new bug. Darwin) if [[ -x /usr/libexec/java_home ]]; then export JAVA_HOME= "$(/usr/libexec/java_home)" else export JAVA_HOME=/Library/Java/Home fi ;; This code doesn't check if JAVA_HOME is already defined. It should.
          Hide
          aw Allen Wittenauer added a comment -

          This might be HADOOP-11022.

          Show
          aw Allen Wittenauer added a comment - This might be HADOOP-11022 .
          Hide
          eddyxu Lei (Eddy) Xu added a comment -

          Allen Wittenauer Would you mind to take a look to see whether this bug is introduced by the shell re-written work?

          Show
          eddyxu Lei (Eddy) Xu added a comment - Allen Wittenauer Would you mind to take a look to see whether this bug is introduced by the shell re-written work?

            People

            • Assignee:
              aw Allen Wittenauer
              Reporter:
              eddyxu Lei (Eddy) Xu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development