[ 
https://issues.apache.org/jira/browse/HADOOP-11033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14115926#comment-14115926
 ] 

Allen Wittenauer commented on HADOOP-11033:
-------------------------------------------

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

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

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

> /bin/hdfs script ignores JAVA_HOME
> ----------------------------------
>
>                 Key: HADOOP-11033
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11033
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions: 3.0.0
>         Environment: Mac OSX with both JDK_1.7.0_67 and JDK_1.8.0_20 
> installed.
>            Reporter: Lei (Eddy) Xu
>
> 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
> {noformat}
>  $ echo $JAVA_HOME
> /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
> {noformat}
> However, when I start a local cluster using {{start-dfs.sh}}, it reports
> {noformat}
> 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
> {noformat}
> It is expected to use JDK 7 instead. This bug only occurs on trunk, but not 
> branch-2.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to