1

I know there is a samiliar title question but whta we ask is different. I Tried this

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

And I get this:

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
​

However, I do have the /home/hduser/Text And I'm using hdfs command What does the error mean? How can i fix it

Colonel Thirty Two
  • 23,953
  • 8
  • 45
  • 85
Gavin Niu
  • 1,315
  • 4
  • 20
  • 27

1 Answers1

2

However, I do have the /home/hduser/Text And I'm using hdfs command What does the error mean? How can i fix it

Either /home/hduser/Text doesn't exist or Syntax is incorrect. For later case, try below:

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

 To 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 <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.
Vinkal
  • 2,964
  • 1
  • 19
  • 19
  • But the /tmp/Text is my local file – Gavin Niu Oct 14 '15 at 16:26
  • By using hdfs dfs command, the warning about hdfs command disappeared. However I still have 15/10/14 11:30:56 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable – Gavin Niu Oct 14 '15 at 16:32
  • Please check if /home/hduser/Text exist on HDFS. run hadoop fs -ls /home/hduser/Text – Vinkal Oct 14 '15 at 16:32
  • How can I Check the files on HDFS? can you show me the exact command? – Gavin Niu Oct 14 '15 at 16:34
  • hadoop fs -ls /home/hduser/Text – Vinkal Oct 14 '15 at 16:35
  • hduser@tong-VirtualBox:/usr/local/hadoop/sbin$ hadoop fs -ls /user/hduser 15/10/14 11:37:05 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable ls: `/user/hduser': No such file or directory – Gavin Niu Oct 14 '15 at 16:37
  • it says - No such file or directory and hence error – Vinkal Oct 14 '15 at 16:39
  • It just a warning. see this SO link - http://stackoverflow.com/questions/19943766/hadoop-unable-to-load-native-hadoop-library-for-your-platform-warning – Vinkal Oct 14 '15 at 16:43
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/92295/discussion-between-gavin-niu-and-vinkal). – Gavin Niu Oct 14 '15 at 17:34
  • @GavinNiu - My pleasure. – Vinkal Oct 14 '15 at 18:34