首页 > 其他 > 详细

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

时间:2014-08-29 22:35:28      阅读:1069      评论:0      收藏:0      [点我收藏+]

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

 

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

原文:http://www.cnblogs.com/mjorcen/p/3945792.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!