我已经安装了 hadoop-2.0.0-alpha,但是每当我执行一个命令时,它都会给我弃用错误(尽管它看起来运行没有问题)
$ 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.
我用谷歌搜索了一下,它看起来像是 hadoop-0.23 的一个错误。但是,我的版本是最新的。
我找不到这个版本的答案,它仍然是一个存在的错误吗?
最佳答案
dfs 已被弃用,取而代之的是“fs”命令。例如,这个:
hadoop fs -copyFromLocal input input // this uses FsShell
而不是这个:
hadoop dfs -copyFromLocal input input // this uses the now deprecated HDFS-specific DFSShell
关于这里的区别的一些很好的背景:
http://nsinfra.blogspot.com/2012/06/difference-between-hadoop-dfs-and.html
关于hadoop - 为什么在运行 hadoop(或 dfs 命令)时一直显示 deprecated 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11715082/