@Override protected boolean initialChore() { try { if (this.enabled.get()) scan(); } catch (IOException e) { LOG.warn("Failed initial scan of catalog table", e); return false; } return true; }
@Override public RunCatalogScanResponse runCatalogScan(RpcController c, RunCatalogScanRequest req) throws ServiceException { rpcPreCheck("runCatalogScan"); try { return ResponseConverter.buildRunCatalogScanResponse(master.catalogJanitorChore.scan()); } catch (IOException ioe) { throw new ServiceException(ioe); } }
@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); } }
@Override protected boolean initialChore() { try { if (this.enabled) scan(); } catch (IOException e) { LOG.warn("Failed initial scan of catalog table", e); return false; } return true; }
@Override protected void chore() { try { scan(); } catch (IOException e) { LOG.warn("Failed scan of catalog table", e); } }
@Override protected boolean initialChore() { try { if (this.enabled.get()) scan(); } catch (IOException e) { LOG.warn("Failed initial scan of catalog table", e); return false; } return true; }
@Override public RunCatalogScanResponse runCatalogScan(RpcController c, RunCatalogScanRequest req) throws ServiceException { try { master.checkInitialized(); return ResponseConverter.buildRunCatalogScanResponse(master.catalogJanitorChore.scan()); } catch (IOException ioe) { throw new ServiceException(ioe); } }
@Override protected void chore() { try { AssignmentManager am = this.services.getAssignmentManager(); if (this.enabled.get() && am != null && am.isFailoverCleanupDone() && am.getRegionStates().getRegionsInTransition().size() == 0) { scan(); } else { LOG.warn("CatalogJanitor disabled! Not running scan."); } } catch (IOException e) { LOG.warn("Failed scan of catalog table", e); } }