HBASE-15211 Don't run the CatalogJanitor if there are regions in transition

This commit is contained in:
Elliott Clark 2016-02-03 13:38:53 -08:00
parent 2cf8af5bf1
commit f5fba2ba0d
1 changed files with 5 additions and 1 deletions

View File

@ -96,7 +96,11 @@ public class CatalogJanitor extends ScheduledChore {
@Override
protected void chore() {
try {
if (this.enabled.get()) {
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.");