// Also check that the edits file is empty here
// and that temporary checkpoint files are gone.
FSImage image = cluster.getNameNode().getFSImage();
for (Iterator<StorageDirectory> it =
image.dirIterator(NameNodeDirType.IMAGE); it.hasNext();) {
StorageDirectory sd = it.next();
assertFalse(FSImage.getImageFile(sd, NameNodeFile.IMAGE_NEW).exists());
}
for (Iterator<StorageDirectory> it =
image.dirIterator(NameNodeDirType.EDITS); it.hasNext();) {
StorageDirectory sd = it.next();
assertFalse(image.getEditNewFile(sd).exists());
File edits = image.getEditFile(sd);
assertTrue(edits.exists()); // edits should exist and be empty
long editsLen = edits.length();
assertTrue(editsLen == Integer.SIZE/Byte.SIZE);