DFSTestUtil.createFile(fs, new Path("/tmp.txt"),
LONG_FILE_LEN, (short)1, 1L);
List<DataNode> datanodes = cluster.getDataNodes();
assertEquals(datanodes.size(), 1);
DataNode datanode = datanodes.get(0);
DataNodeMetrics metrics = datanode.getMetrics();
DataNodeStatistics statistics = new DataNodeStatistics(
metrics, datanode.dnRegistration.storageID);
assertEquals(LONG_FILE_LEN, statistics.getBytesWritten());
} finally {
if (cluster != null) {cluster.shutdown();}