I get an Exception when trying to copy a file from local filesystem to hadoop fs


4 Answer(s)


Can you check if your data node is reachable to name node ?
https://wiki.apache.org/hadoop/CouldOnlyBeReplicatedTo

http://stackoverflow.com/questions/5293446/hdfs-error-could-only-be-replicated-to-0-nodes-instead-of-1

Hi Subhra,

The error is coming because the replication factor is 0. If you update the replication factor to 1 or 2, the same command will work.
Thank you.

hi Subra,
Please try setting the block replication to 1 and try again