我在运行hadoop命令时遇到错误
sagar@sagar-desktop:~$ hadoop version
Warning: $HADOOP_HOME is deprecated.
Downloads/hadoop-1.2.1/bin/hadoop: line 350: /usr/lib/java/jdk1.7.0_67/bin/java: No such file or directory
Downloads/hadoop-1.2.1/bin/hadoop: line 434: /usr/lib/java/jdk1.7.0_67/bin/java: No such file or directory
java和hadoop路径是
$JAVA_HOME = /usr/lib/java/jdk1.7.0_67
$HADOOP_HOME = Downloads/hadoop-1.2.1
请帮我解决这些错误
答案 0 :(得分:0)
请阅读this Hadoop wiki page。您需要在hadoop / conf目录中的JAVA_HOME
文件中设置hadoop-env.sh
变量,格式化HDFS,然后您可以尝试hadoop version
命令。