将文件从本地复制到hdfs

mzmfm0qo  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(532)

我知道有一个萨米利亚头衔的问题,但我们问什么是不同的。我试过了

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

我明白了:

  1. DEPRECATED: Use of this script to execute hdfs command is deprecated.
  2. Instead use the hdfs command for it.
  3. 15/10/14 10:15:21 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  4. copyFromLocal: `/home/hduser/Text': No such file or directory

但是,我有/home/hduser/text,并且我使用hdfs命令,这个错误意味着什么?我该怎么修

mwg9r5ms

mwg9r5ms1#

但是,我有/home/hduser/text,并且我使用hdfs命令,这个错误意味着什么?我该怎么修
/home/hduser/text不存在或语法不正确。对于以后的情况,请尝试以下操作: hduser@tong-VirtualBox:/usr/local/hadoop$ bin/hadoop dfs -copyFromLocal /home/hduser/Text /tmp/TextTo get rid of warning - DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it.hduser@tong-VirtualBox:/usr/local/hadoop$ hdfs dfs -copyFromLocal /home/hduser/Text /tmp/Text ```
copyFromLocal:

Usage: hdfs dfs -copyFromLocal URI

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

Options:

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

相关问题