Thread.sleep(1000);
} catch (InterruptedException ignored) {}
}
// restart the datanode so the corrupt replica will be detected
cluster.restartDataNode(dnProps);
DFSTestUtil.waitReplication(fs, fileName, (short)2);
final DatanodeID corruptDataNode =
cluster.getDataNodes().get(2).dnRegistration;
final FSNamesystem namesystem = FSNamesystem.getFSNamesystem();