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 4a33bcd..ea443e5 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 @@ -1915,6 +1915,21 @@ public class HMaster extends HRegionServer implements MasterServices, Server { } /** + * Used in tests to stop the processing of dead servers a while so we can have the state of + * dead regionservers stick around longer. + * @param b + * @return State of the serverShutdownHandlerEnabled flag. + * @throws InterruptedException + * @throws IOException + */ + @VisibleForTesting + public boolean serverShutdownHandlerEnabled(boolean b) throws IOException, InterruptedException { + if (b) enableServerShutdownHandler(true); + else this.serverShutdownHandlerEnabled = b; + return b; + } + + /** * Report whether this master has started initialization and is about to do meta region assignment * @return true if master is in initialization & about to assign hbase:meta regions */