我正在使用OpenClassroom并试图了解Hadoop,但是在安装它时遇到了一些问题(我在Linux上有点陌生):
我已经安装并配置了Hadoop(已按照网站上的要求更改了文件etc/hadoop/core-site.xml
,etc/hadoop/hdfs-site.xml
,etc/hadoop/mapred-site.xml
和etc/hadoop/yarn-site.xml
)
但是之后,他们告诉我这样做以启动Hadoop:
$ hdfs namenode -format
$ start-dfs.sh
$ start-yarn.sh
但是当我这样做时,它给了我:
hdfs : command can't be found
我究竟做错了什么?
最佳答案
在以下情况下可能会发生此问题:
1) hdfs binaries are not installed properly
2) The location of the hdfs execuatble script is not present in $PATH of the user who is executing the command. To verify the same, try the below steps:-
A) Please clarify if the hdfs binaries is installed by navigating to the location "/usr/hdp//hadoop-hdfs/bin" directory.
B) Please check if /usr/bin directory and HADOOP_HOME is present in the $PATH environment variable? (echo $PATH)
C) Output of the command ls -ltr /usr/bin/hdfs. By default a softlink is created for hdfs script in usr/bin directory.
关于hadoop - 格式化本地文件系统HDFS并启动Hadoop,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54533911/