hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject hbase git commit: HBASE-15211 Don't run the CatalogJanitor if there are regions in transition
Date Thu, 04 Feb 2016 16:53:02 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 2cf8af5bf -> f5fba2ba0


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


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f5fba2ba
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f5fba2ba
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f5fba2ba

Branch: refs/heads/master
Commit: f5fba2ba0d5ed9717d3a6439a24235710ac0886b
Parents: 2cf8af5
Author: Elliott Clark <eclark@apache.org>
Authored: Wed Feb 3 13:38:53 2016 -0800
Committer: Elliott Clark <eclark@apache.org>
Committed: Thu Feb 4 08:52:09 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/master/CatalogJanitor.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f5fba2ba/hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java
index d02e5ae..b9abc65 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java
@@ -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.");


Mime
View raw message