@Override protected void chore() { try { AssignmentManager am = this.services.getAssignmentManager(); if (this.enabled.get() && !this.services.isInMaintenanceMode() && !this.services.getServerManager().isClusterShutdown() && am != null && am.isMetaLoaded() && !am.hasRegionsInTransition()) { scan(); } else { LOG.warn("CatalogJanitor is disabled! Enabled=" + this.enabled.get() + ", maintenanceMode=" + this.services.isInMaintenanceMode() + ", am=" + am + ", metaLoaded=" + (am != null && am.isMetaLoaded()) + ", hasRIT=" + (am != null && am.hasRegionsInTransition()) + " clusterShutDown=" + this.services .getServerManager().isClusterShutdown()); } } catch (IOException e) { LOG.warn("Failed scan of catalog table", e); } }
listener.waiting(); while (!this.master.isStopped() && !isClusterShutdown() && count < maxToStart && ((lastCountChange + interval) > now || timeout > slept || count < minToStart)) { if (isClusterShutdown()) { this.master.stop("Cluster shutdown");
if (this.master.getServerManager().isClusterShutdown() && state.equals(TransitionCode.CLOSED)) { LOG.info("RegionServer {} {}", state, regionNode.getRegionInfo().getEncodedName());
return false; if (this.getServerManager().isClusterShutdown()) { LOG.info("Cluster is shutting down, don't run region normalizer."); return false;
if (isClusterShutdown()) { LOG.info("Cluster shutdown set; " + serverName + " expired; onlineServers=" + this.onlineServers.size());
/** * @param region * @param setOfflineInZK * @param forceNewPlan * @param hijack * - true new assignment is needed, false otherwise */ public void assign(HRegionInfo region, boolean setOfflineInZK, boolean forceNewPlan, boolean hijack) { // If hijack is true do not call disableRegionIfInRIT as // we have not yet moved the znode to OFFLINE state. if (!hijack && isDisabledorDisablingRegionInRIT(region)) { return; } if (this.serverManager.isClusterShutdown()) { LOG.info("Cluster shutdown is set; skipping assign of " + region.getRegionNameAsString()); return; } RegionState state = addToRegionsInTransition(region, hijack); synchronized (state) { assign(region, state, setOfflineInZK, forceNewPlan, hijack); } }
this.serverManager.isClusterShutdown()) { this.serverManager.letRegionServersShutdown();
this.serverManager.isClusterShutdown()) { this.serverManager.letRegionServersShutdown();