Deprecated: use of this script to execute HDFS command is deprecated.
The hadoop version I installed is 2.4.0, but the following information is displayed every time I run the command.
[email protected]_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
Originally, hadoop commands were replaced with HDFS commands after version 0.21.0. The above commands are like the following commands:
Hdfs dfs-ls // there is no error.
[email protected]_160_34_centos:/usr/local/hadoop-2.4.0> hdfs dfs -ls //Found 2 itemsdrwxr-xr-x - hadoop supergroup 0 2014-08-29 21:30 /indrwx------ - hadoop supergroup 0 2014-08-29 15:03 /tmp
Similarly:
[email protected]_160_34_centos:/usr/local/hadoop-2.4.0> hadoop dfs -put ./input inDEPRECATED: Use of this script to execute hdfs command is deprecated.Instead use the hdfs command for it.put: `in‘: No such file or directory
Changed:
[email protected]_160_34_centos:/usr/local/hadoop-2.4.0> hdfs dfs -put input/README.txt /t
The absolute path must start with a slash. It seems that there is no working directory in hadoop.
For example:
[email protected]_160_34_centos:/usr/local/hadoop-2.4.0> hdfs dfs -mkdir test5mkdir: `test5‘: No such file or directory
Add /.
[email protected]_160_34_centos:/usr/local/hadoop-2.4.0> hdfs dfs -mkdir /test4
Deprecated: use of this script to execute HDFS command is deprecated.