Created 05-30-2016 04:54 AM
I make a cluster used ambari included 1 namenode and 4 datanode on vmware. A datanode was broken ,so I deleted this one and created a new datanode .But cluster created CORRUPT blocks .I try to "hdfs fsck -delete / " to fix it, but lost lots of data. how to fix corrupt blocks ?
Created 05-30-2016 04:56 AM
Want to get a detailed solution you have to login/registered on the community
Register/LoginCreated 05-30-2016 04:56 AM
Want to get a detailed solution you have to login/registered on the community
Register/LoginCreated 05-30-2016 05:03 AM
What is the replication factor defined, as 1 datanode down should not cause the corruption. Were other datanodes also down at the same time?
Created 05-30-2016 05:15 AM
The best way is to find which are corrupted blocks using below command -
hdfs fsck /path/to/corrupt/file -locations -blocks -files
And then try to manually remove this using "hadoop rm -r </path>" to avoid dataloss.
But still fsck does not remove good copied of data blocks.