ERROR: JAVA_HOME is not set and could not be found.
背景
- 启动hadoop集群时报错,先是报错Attempting to operate on hdfs namenode as root but there is no HDFS_NAMENODE_USER defined. Aborting
解决方案
-
在$HADOOP_HOME/etc/hadoop目录下添加jdk的位置,注意分发到集群其它机器
export JAVA_HOME=/opt/module/jdk1.8