HADOOP-10668. TestZKFailoverControllerStress#testExpireBackAndForth occasionally fails. Contributed by Ming Ma.

(cherry picked from commit 7fc1f2f5cf)
This commit is contained in:
cnauroth 2015-01-19 11:28:30 -08:00
parent 5da33c5b5d
commit a70e2c15be
3 changed files with 8 additions and 3 deletions

View File

@ -366,6 +366,9 @@ Release 2.7.0 - UNRELEASED
HADOOP-10542 Potential null pointer dereference in Jets3tFileSystemStore
retrieveBlock(). (Ted Yu via stevel)
HADOOP-10668. TestZKFailoverControllerStress#testExpireBackAndForth
occasionally fails. (Ming Ma via cnauroth)
Release 2.6.0 - 2014-11-18
INCOMPATIBLE CHANGES

View File

@ -154,6 +154,8 @@ public abstract class ZKFailoverController {
return localTarget;
}
HAServiceState getServiceState() { return serviceState; }
public int run(final String[] args) throws Exception {
if (!localTarget.isAutoFailoverEnabled()) {
LOG.fatal("Automatic failover is not enabled for " + localTarget + "." +

View File

@ -158,8 +158,8 @@ public class MiniZKFCCluster {
*/
public void waitForHAState(int idx, HAServiceState state)
throws Exception {
DummyHAService svc = getService(idx);
while (svc.state != state) {
DummyZKFC svc = getZkfc(idx);
while (svc.getServiceState() != state) {
ctx.checkException();
Thread.sleep(50);
}