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

 

posted @   mjorcen  阅读(15796)  评论(0编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 字符编码:从基础到乱码解决
点击右上角即可分享
微信分享提示