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:55:15 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 15db2244e -> bc564d3a6


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/bc564d3a
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/bc564d3a
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/bc564d3a

Branch: refs/heads/branch-1.1
Commit: bc564d3a6a0e0bc41dc35eb799b2d9e3f8a10bf2
Parents: 15db224
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:53:15 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/bc564d3a/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 6db7802..d43e71a 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
@@ -98,7 +98,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