Reputation: 15
While copying file from Local system to HDFS i am getting the below error,I am using Single Node
13/08/04 10:50:02 WARN hdfs.DFSClient: DataStreamer Exception: java.io.IOException: File /user/vishu/input could only be replicated to 0 nodes, instead of 1
I deleted the dfs/Name and dfs/data directories and formated the Namenode still No use. and I have enough space to replicate the Data.
Could anyone help resolving this issue?
Regards, Vishwa
Upvotes: 1
Views: 5571
Reputation: 621
If your Client writing the file is outside the cluster, make sure the client has access to the Datanode.
Look at this http://www.hadoopinrealworld.com/could-only-be-replicated-to-0-nodes/
Upvotes: 0
Reputation: 1
Check whether all daemons are started or not. make sure that your input file is correct.
Use the following command to copy the file from local to hdfs:
bin/hadoop fs -mkdir abc
bin/hadoop fs -copyFromLocal inputfile abc
Upvotes: 0
Reputation: 2356
Some times the data node may be starting up slowly and this may cause the above issue.. keep some wait time after the start of dfs and mapred demons.
bin/hadoop namenode -format
bin/start-dfs.sh
wait for some 5 min(data node will be up in the time)
bin/start-mapred.sh
Upvotes: 6