HBASE-20013 TestZKPermissionWatcher is flakey

This commit is contained in:
Michael Stack 2018-02-16 20:11:03 -08:00
parent 969895105c
commit 68d509bc1f
1 changed files with 14 additions and 4 deletions

View File

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