HDFS-2981. In hdfs-default.xml, the default value of dfs.client.block.write.replace-datanode-on-failure.enable should be true.