7

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?

merours
  • 4,076
  • 7
  • 37
  • 69
user1561806
  • 161
  • 2
  • 4
  • 6
  • 1
    Do you also have a command called "hdfs"? The error message seems to suggest to use that one. – Thilo Jul 30 '12 at 03:51
  • 4
    use ./bin hadoop fs -copyFromLocal input input ;dfs is deprecated. – Animesh Raj Jha Jul 30 '12 at 03:54
  • Thilo, i cant find command called "hdfs", Animesh, Thanks!! it solved.. i see.. – user1561806 Jul 30 '12 at 05:41
  • Looks a bit related to this post: [https://stackoverflow.com/questions/52138821/error-in-datanode-execution-while-running-hadoop-first-time-in-windows-10/58924939#58924939](https://stackoverflow.com/questions/52138821/error-in-datanode-execution-while-running-hadoop-first-time-in-windows-10/58924939#58924939) – mv1 Nov 19 '19 at 00:33

1 Answers1

20

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

rICh
  • 1,709
  • 2
  • 15
  • 25
  • 1
    For anyone reading the post recently, use the following instead (CLI was updated about 6-8? months ago):`hdfs dfs -copyFromLocal /path/to/local/target/file-or-directory /path/to/hdfs/target-directory` i – rICh May 21 '15 at 23:13