getFSImage().dirIterator(FSImage.NameNodeDirType.IMAGE);
List<Long> checksums = new ArrayList<Long>();
while (iter.hasNext()) {
StorageDirectory sd = iter.next();
File fsImage = FSImage.getImageFile(sd, FSImage.NameNodeFile.IMAGE);
PureJavaCrc32 crc = new PureJavaCrc32();
FileInputStream in = new FileInputStream(fsImage);
byte[] buff = new byte[4096];
int read = 0;
while ((read = in.read(buff)) != -1) {
crc.update(buff, 0, read);
}
long val = crc.getValue();
checksums.add(val);
}
assertTrue("Not enough fsimage copies in MiniDFSCluster " +
"to test parallel write", checksums.size() > 1);
for (int i = 1; i < checksums.size(); i++) {