本人安裝的hadoop版本是2.4.0的,但每次執行命令時都會顯示下面的信息centos
hadoop@VM_160_34_centos:/usr/local/hadoop-2.4.0> hadoop dfs -ls . DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. ls: `.': No such file or directory
原來從0.21.0版本之後,hadoop 命令換成了hdfs命令,上面的命令如同下面的命令:oop
hdfs dfs -ls // 這時就沒有錯誤了this
hadoop@VM_160_34_centos:/usr/local/hadoop-2.4.0> hdfs dfs -ls // Found 2 items drwxr-xr-x - hadoop supergroup 0 2014-08-29 21:30 /in drwx------ - hadoop supergroup 0 2014-08-29 15:03 /tmp
一樣:spa
hadoop@VM_160_34_centos:/usr/local/hadoop-2.4.0> hadoop dfs -put ./input in DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. put: `in': No such file or directory
改成:code
hadoop@VM_160_34_centos:/usr/local/hadoop-2.4.0> hdfs dfs -put input/README.txt /t
而且要使用絕對路徑必須以 / 頭 。好像Hadoop 裏面也沒有工做目錄一說blog
如:ip
hadoop@VM_160_34_centos:/usr/local/hadoop-2.4.0> hdfs dfs -mkdir test5 mkdir: `test5': No such file or directory
加上/ 就能成功hadoop
hadoop@VM_160_34_centos:/usr/local/hadoop-2.4.0> hdfs dfs -mkdir /test4