0
votes

I have started working in hadoop, i am a beginner. I have succuefully install the hadoop-2.6.0 in ubuntu 15.04 64 bit. The commond like start-all.sh, start-dfs.sh etc are working nicely.

I am facing the problem when i am trying to move the local file system to HDFS.

Like in copyFromLocal command: hadoop dfs -copyFromLocal ~/Hadoop/test/text2.txt ~/Hadoop/test_hds/input.txt DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it.

15/06/04 23:18:29 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable copyFromLocal: Call From royaljay-Inspiron-N4010/127.0.1.1 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

Same problem in mkdir command:

hadoop dfs -put ~/test/test/test1.txt hd.txt DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it.

15/06/03 20:49:18 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

put: Cannot create file/user/hduser/hd.txt.COPYING. Name node is in safe mode.

I have found many solutions, but no one is working out.

If anyone have idea about this please tell me.

1
hadoop dfs -copyFromLocal ~/Hadoop/test/text2.txt ~/Hadoop/test_hds/input.txt DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. 15/06/04 23:29:55 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable copyFromLocal: `/home/hduser/Hadoop/test_hds/input.txt': No such file or directoryMrityunjay Singh
Do you have the hadoop client jars downloaded and setup to work correctly? That seems like it could be the issue - I've run into that in the past.rreichel

1 Answers

3
votes

DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it.

You should not use hadoop dfs, instead use the following command:

hdfs dfs -copyFromLocal ...

Do not use ~, instead mention full path like /home/hadoop/Hadoop/test/text2.txt

Call From royaljay-Inspiron-N4010/127.0.1.1 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

127.0.1.1 will cause loopback problems. Remove the line with 127.0.1.1 from /etc/hosts.

NOTE: For copying files from local filesystem to HDFS, try using -put command instead of -copyFromLocal.