/** * Queries the state of the {@link LoadBalancerTracker}. If the balancer is not initialized, * false is returned. * * @return The state of the load balancer, or false if the load balancer isn't defined. */ public boolean isBalancerOn() { return !isInMaintenanceMode() && loadBalancerTracker != null && loadBalancerTracker.isBalancerOn(); }
/** * Queries the state of the {@link RegionNormalizerTracker}. If it's not initialized, * false is returned. */ public boolean isNormalizerOn() { return !isInMaintenanceMode() && regionNormalizerTracker != null && regionNormalizerTracker.isNormalizerOn(); }
/** * Queries the state of the {@link SplitOrMergeTracker}. If it is not initialized, * false is returned. If switchType is illegal, false will return. * @param switchType see {@link org.apache.hadoop.hbase.client.MasterSwitchType} * @return The state of the switch */ @Override public boolean isSplitOrMergeEnabled(MasterSwitchType switchType) { return !isInMaintenanceMode() && splitOrMergeTracker != null && splitOrMergeTracker.isSplitOrMergeEnabled(switchType); }
@Override public IsInMaintenanceModeResponse isMasterInMaintenanceMode( final RpcController controller, final IsInMaintenanceModeRequest request) throws ServiceException { IsInMaintenanceModeResponse.Builder response = IsInMaintenanceModeResponse.newBuilder(); response.setInMaintenanceMode(master.isInMaintenanceMode()); return response.build(); }
if (isInMaintenanceMode()) { LOG.info("Master is in maintenanceMode mode, don't run balancer."); return false;
return false; if (isInMaintenanceMode()) { LOG.info("Master is in maintenance mode, don't run region normalizer."); return false; if (isInMaintenanceMode()) { LOG.debug("Master is in maintenance mode, stop running region normalizer."); return false;
if (master.isInMaintenanceMode() )