HBASE-20013 TestZKPermissionWatcher is flakey

This commit is contained in:
Michael Stack 2018-02-16 20:11:03 -08:00
parent 72193650dd
commit 3ea2ffcd57
1 changed files with 14 additions and 4 deletions

View File

@ -2729,11 +2729,21 @@ public class HMaster extends HRegionServer implements MasterServices {
} }
} }
void checkInitialized() public static class MasterStoppedException extends DoNotRetryIOException {
throws PleaseHoldException, ServerNotRunningYetException, MasterNotRunningException { MasterStoppedException() {
super();
}
}
void checkInitialized() throws PleaseHoldException, ServerNotRunningYetException,
MasterNotRunningException, MasterStoppedException {
checkServiceStarted(); checkServiceStarted();
if (!isInitialized()) throw new PleaseHoldException("Master is initializing"); if (!isInitialized()) {
if (isStopped()) throw new MasterNotRunningException(); throw new PleaseHoldException("Master is initializing");
}
if (isStopped()) {
throw new MasterStoppedException();
}
} }
/** /**