DEPRECATED: Use of this script to execute hdfs command is deprecated.


DEPRECATED: Use of this script to execute hdfs command is deprecated. 

 

本人安裝的hadoop版本是2.4.0的,但每次執行命令時都會顯示下面的信息

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命令,上面的命令如同下面的命令:

 hdfs dfs -ls  // 這時就沒有錯誤了

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

 

同樣:

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

 

改為:

hadoop@VM_160_34_centos:/usr/local/hadoop-2.4.0> hdfs dfs -put input/README.txt /t

並且要使用絕對路徑必須以 / 頭 。好像Hadoop 里面也沒有工作目錄一說

如:

hadoop@VM_160_34_centos:/usr/local/hadoop-2.4.0> hdfs dfs -mkdir test5
mkdir: `test5': No such file or directory

加上/ 就能成功

hadoop@VM_160_34_centos:/usr/local/hadoop-2.4.0> hdfs dfs -mkdir /test4

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM