LOG.info("Failover: Test framework - disabled");
return;
}
String fsck = "";
LOG.info("Failover: Test framework - verification - starting...");
AvatarFailoverSnapshot snapshot = new AvatarFailoverSnapshot();
File snapshotFile = getSnapshotFile(confg, false);
if (snapshotFile == null)
return;
DataInputStream in = new DataInputStream(
new BufferedInputStream(new FileInputStream(snapshotFile)));
try {
snapshot.readFields(in);
if (in.readBoolean()) {
LOG.info("Failover: Test framework - found fsck data");
fsck = Text.readString(in);
}
} finally {
in.close();
}
LOG.info("Failover: Test framework - verifying open files: found "
+ snapshot.getOpenFilesInfo().getOpenFiles().size()
+ " files in the test snapshot");
verifyOpenFiles(snapshot.getOpenFilesInfo());
LOG.info("Failover: Test framework - verifying closed files: found "
+ snapshot.getSampledFiles().size()
+ " files in the test snapshot");
for (FileStatusExtended stat : snapshot.getSampledFiles()) {
verifySnapshotSampledFile(stat);
}
LOG.info("Failover: Test framework - verification - succeeded");
this.oldPrimaryFsck = fsck;