DEPRECATED: Use of this script to execute hdfs com

本人安装的hadoop版本是2.5.0的,但每次执行命令时都会显示下面的信息

 

[hadoop@master hadoop]$ hadoop dfs -ls

DEPRECATED: Use of this scriptto execute hdfs command is deprecated.

Instead use the hdfs command for it.

 

原来从此版本以后,hadoop 命令换成了hdfs命令,上面的命令如同下面的命令

[hadoop@master hadoop]$ hdfs dfs -ls  // 这时就没有错误了

 

 

本人安装的 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

 

转载于:https://my.oschina.net/zhangjie830621/blog/380395

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值