/bin/bash: /bin/java: No such file or directory error in Yarn apps in MacOS
在 stackoverflow 找到的方案In HADOOP_HOME/libexec/hadoop-config.sh look for the if condition below # Attempt to set JAVA_HOME if it is not setRemove extra parentheses in the export JAVA_HOME lines as below.
·
在 stackoverflow 找到的方案
In HADOOP_HOME/libexec/hadoop-config.sh look for the if condition below # Attempt to set JAVA_HOME if it is not set
Remove extra parentheses in the export JAVA_HOME lines as below. Change this
if [ -x /usr/libexec/java_home ]; then
export JAVA_HOME=($(/usr/libexec/java_home))
else
export JAVA_HOME=(/Library/Java/Home)
fi
to
if [ -x /usr/libexec/java_home ]; then
// note that the extra parentheses are removed
export JAVA_HOME=$(/usr/libexec/java_home)
else
export JAVA_HOME=/Library/Java/Home
fi
然后重启yarn
但我用的是版本时 3.2.2
hadoop-config.sh 脚本重构过,在以下三个方法中,没找到上面要改的地方。所以直接在后面追加 JAVA_HOME。 然后重启yarn, 亲测可用
更多推荐
已为社区贡献2条内容
所有评论(0)