Repository: hbase Updated Branches: refs/heads/master 969895105 -> 68d509bc1
HBASE-20013 TestZKPermissionWatcher is flakey Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/68d509bc Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/68d509bc Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/68d509bc Branch: refs/heads/master Commit: 68d509bc1ff7a3bf69a596aed49f238b42ee0679 Parents: 9698951 Author: Michael Stack <st...@apache.org> Authored: Fri Feb 16 20:11:03 2018 -0800 Committer: Michael Stack <st...@apache.org> Committed: Fri Feb 16 23:22:23 2018 -0800 ---------------------------------------------------------------------- .../org/apache/hadoop/hbase/master/HMaster.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/68d509bc/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 02fbc02..b949aa9 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -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(); + } } /**