mac下 yarn Stack trace: ExitCodeException exitCode=127

问题出在hadoop 为mac系统配置的读取java_home处。

更改 /Users/shaofengfeng/apache/hadoop/libexec/hadoop-config.sh 如下

# Attempt to set JAVA_HOME if it is not set

if [[ -z $JAVA_HOME ]]; then

  # On OSX use java_home (or /Library for older versions)

  if [ "Darwin" == "$(uname -s)" ]; then

    if [ -x /usr/libexec/java_home ]; then

      export JAVA_HOME=$(/usr/libexec/java_home)

    else

      export JAVA_HOME=(/Library/Java/Home)

    fi

  fi

 

  # Bail if we did not detect it

  if [[ -z $JAVA_HOME ]]; then

    echo "Error: JAVA_HOME is not set and could not be found." 1>&2

    exit 1

  fi

fi

 

https://blog.csdn.net/u014724199/article/details/82790833

猜你喜欢

转载自www.cnblogs.com/lshao/p/11580449.html