Why is it keep showing deprecated error when running hadoop (or dfs command)

南笙酒味 提交于 2019-12-18 12:45:30

问题


I've installed hadoop-2.0.0-alpha, but whenever I execute a command, it gives me deprecation errors (although it seems like to be running without problem)

$ hadoop/bin/hadoop dfs -copyFromLocal input input
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

$ hadoop/bin/hadoop dfs -rmr input
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

rmr: DEPRECATED: Please use 'rm -r' instead.

I googled around and it looks like it's a bug for hadoop-0.23. However, my version is more recent.

I couldn't find an answer for this version, is it still an existing bug?


回答1:


dfs was deprecated in favor of "fs" command. For example, this:

hadoop fs -copyFromLocal input input // this uses FsShell

instead of this:

hadoop dfs -copyFromLocal input input // this uses the now deprecated HDFS-specific DFSShell

Some good background on what the differences were here:

http://nsinfra.blogspot.com/2012/06/difference-between-hadoop-dfs-and.html



来源:https://stackoverflow.com/questions/11715082/why-is-it-keep-showing-deprecated-error-when-running-hadoop-or-dfs-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!