}
// write file1 on datanode1 with 1 replica
UtilsForTests.writeFile(
dfs.getNameNode(), conf, new Path(inDir + "/file1"), (short)1);
// start another two datanodes (2 and 3)
dfs.startDataNodes(conf, 2, true, null, rack2, nodeGroup2, hosts2, null);
dfs.waitActive();
// write two files with 3 replica, so each datanodes will have one replica
// of file2 and file3
UtilsForTests.writeFile(