HDFS error: could only be replicated to 0 nodes, instead of 1

WARNING: The following will destroy ALL data on HDFS. Do not execute the steps in this answer unless you do not care about destroying existing data!!

You should do this:

  1. stop all hadoop services
  2. delete dfs/name and dfs/data directories
  3. hdfs namenode -format Answer with a capital Y
  4. start hadoop services

Also, check the diskspace in your system and make sure the logs are not warning you about it.

Leave a Comment