DFSTestUtil.createFile(fs, FILE_PATH, 1L, REPLICATION_FACTOR, 1L);
DFSTestUtil.waitReplication(fs, FILE_PATH, REPLICATION_FACTOR);
Block block = DFSTestUtil.getFirstBlock(fs, FILE_PATH);
// shutdown the datanode
DataNodeProperties dnprop = shutdownDataNode(cluster, datanodes[0]);
assertEquals(1, namesystem.getMissingBlocksCount()); // one missing block
assertEquals(0, namesystem.getNonCorruptUnderReplicatedBlocks());
// Make the only datanode to be decommissioned
LOG.info("Decommission the datanode " + dnprop);