HDFS-2775. Fix TestStandbyCheckpoints.testBothNodesInStandbyState failing intermittently. Contributed by Todd Lipcon.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-1623@1229901 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Todd Lipcon 2012-01-11 06:14:13 +00:00
parent 298e867673
commit a4f4becf52
3 changed files with 7 additions and 2 deletions

View File

@ -97,3 +97,5 @@ HDFS-2724. NN web UI can throw NPE after startup, before standby state is entere
HDFS-2753. Fix standby getting stuck in safemode when blocks are written while SBN is down. (Hari Mankude and todd via todd)
HDFS-2773. Reading edit logs from an earlier version should not leave blocks in under-construction state. (todd)
HDFS-2775. Fix TestStandbyCheckpoints.testBothNodesInStandbyState failing intermittently. (todd)

View File

@ -1134,4 +1134,7 @@ public class FSImage implements Closeable {
this.lastAppliedTxId = editLog.getLastWrittenTxId();
}
public synchronized long getMostRecentCheckpointTxId() {
return storage.getMostRecentCheckpointTxId();
}
}

View File

@ -121,9 +121,9 @@ public class TestStandbyCheckpoints {
waitForCheckpoint(1, ImmutableList.of(0, 12));
waitForCheckpoint(0, ImmutableList.of(0, 12));
assertEquals(12, nn0.getNamesystem().getFSImage().getStorage()
assertEquals(12, nn0.getNamesystem().getFSImage()
.getMostRecentCheckpointTxId());
assertEquals(12, nn1.getNamesystem().getFSImage().getStorage()
assertEquals(12, nn1.getNamesystem().getFSImage()
.getMostRecentCheckpointTxId());
List<File> dirs = Lists.newArrayList();