我知道有一个熟悉的标题问题,但是我们问的却有所不同。
我试过了

hduser@tong-VirtualBox:/usr/local/hadoop$ bin/hadoop dfs -copyFromLocal /tmp/Text /home/hduser/Text

我得到这个:
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

15/10/14 10:15:21 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
copyFromLocal: `/home/hduser/Text': No such file or directory
​

但是,我确实有/ home / hduser / Text并且正在使用hdfs命令
错误是什么意思?我该如何解决

最佳答案



/ home / hduser / Text不存在,或者语法不正确。对于以后的情况,请尝试以下操作:

hduser@tong-VirtualBox:/usr/local/hadoop$ bin/hadoop dfs -copyFromLocal /home/hduser/Text /tmp/Text



hduser@tong-VirtualBox:/usr/local/hadoop$ hdfs dfs -copyFromLocal /home/hduser/Text /tmp/Text

copyFromLocal:

Usage: hdfs dfs -copyFromLocal <localsrc> URI

Similar to put command, except that the source is restricted to a local file reference.

Options:

    The -f option will overwrite the destination if it already exists.

10-07 17:09