执行 hadoop namenode -format
出现以下错误:
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
/usr/hadoop/hadoop-2.7.1/bin/hdfs:行304: /usr/java/jdk1.8.0-212/bin/java: 没有那个文件或目录
出现错误的问题在于hadoop配置文件中hadoop-env.sh文件中JAVA_HOME配置错误
本人错误的代码如下:
正确代码如下:
问题就在于jdk1.8.0后面的下划线_,可能输入成了-
系统显示时不是很明显 ,检查不太容易看出来