hadoop-2.7.1:Error: Cannot find configuration directory: /etc/hadoop


由于配置是hadoop-2.7.4所以后来在启动过程会发现

终端执行 ./start-yarn.sh
starting yarn daemons
Error: Cannot find configuration directory: /etc/hadoop
Error: Cannot find configuration directory: /etc/hadoop

是找不到目录的原因,通过阅读相应的shell脚本可以找到解决方案~

解决方法:

在hadoop-env.sh 配置一条hadoop配置文件所在目录export HADOOP_CONF_DIR=/opt/hadoop-2.7.1/etc/hadoop/ 执行:source hadoop-env.sh

;