hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject hbase git commit: HBASE-20098 Fix TestSplitTransactionOnCluster#testMasterRestartWhenSplittingIsPartial for branch-1.2
Date Wed, 28 Feb 2018 16:59:59 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 c0e82bef0 -> d55c48e87


HBASE-20098 Fix TestSplitTransactionOnCluster#testMasterRestartWhenSplittingIsPartial for
branch-1.2

Signed-off-by: Sean Busbey <busbey@apache.org>


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

Branch: refs/heads/branch-1.2
Commit: d55c48e87f371f5d76af8ad791741364e5f528eb
Parents: c0e82be
Author: Chia-Ping Tsai <chia7712@gmail.com>
Authored: Tue Feb 27 23:16:28 2018 +0800
Committer: Sean Busbey <busbey@apache.org>
Committed: Wed Feb 28 10:57:58 2018 -0600

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/master/HMaster.java   |  7 ++++++-
 .../regionserver/TestSplitTransactionOnCluster.java    | 13 +++++++++----
 2 files changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d55c48e8/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index 266c0fb..845bd6d 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -813,7 +813,7 @@ public class HMaster extends HRegionServer implements MasterServices,
Server {
     getChoreService().scheduleChore(balancerChore);
     this.normalizerChore = new RegionNormalizerChore(this);
     getChoreService().scheduleChore(normalizerChore);
-    this.catalogJanitorChore = new CatalogJanitor(this, this);
+    this.catalogJanitorChore = createCatalogJanitor();
     getChoreService().scheduleChore(catalogJanitorChore);
 
     // Do Metrics periodically
@@ -872,6 +872,11 @@ public class HMaster extends HRegionServer implements MasterServices,
Server {
     zombieDetector.interrupt();
   }
 
+  @VisibleForTesting
+  protected CatalogJanitor createCatalogJanitor() {
+    return new CatalogJanitor(this, this);
+  }
+
   private void initQuotaManager() throws IOException {
     quotaManager = new MasterQuotaManager(this);
     this.assignmentManager.setRegionStateListener((RegionStateListener) quotaManager);

http://git-wip-us.apache.org/repos/asf/hbase/blob/d55c48e8/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
index 0a8104c..f3d2d79 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
@@ -26,13 +26,13 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import com.google.protobuf.ServiceException;
 import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.CountDownLatch;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -82,6 +82,7 @@ import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.exceptions.DeserializationException;
 import org.apache.hadoop.hbase.executor.EventType;
 import org.apache.hadoop.hbase.master.AssignmentManager;
+import org.apache.hadoop.hbase.master.CatalogJanitor;
 import org.apache.hadoop.hbase.master.HMaster;
 import org.apache.hadoop.hbase.master.RegionState;
 import org.apache.hadoop.hbase.master.RegionState.State;
@@ -89,7 +90,6 @@ import org.apache.hadoop.hbase.master.RegionStates;
 import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.regionserver.compactions.CompactionContext;
 import org.apache.hadoop.hbase.regionserver.compactions.NoLimitCompactionThroughputController;
-import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.testclassification.LargeTests;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
@@ -112,8 +112,6 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.google.protobuf.ServiceException;
-
 /**
  * Like TestSplitTransaction in that we're testing {@link SplitTransactionImpl}
  * only the below tests are against a running cluster where TestSplitTransaction
@@ -1665,6 +1663,13 @@ public class TestSplitTransactionOnCluster {
         InterruptedException {
       super(conf, cp);
     }
+
+    @Override
+    protected CatalogJanitor createCatalogJanitor() {
+      CatalogJanitor cj = super.createCatalogJanitor();
+      cj.setEnabled(false);
+      return cj;
+    }
   }
 
   private static class SplittingNodeCreationFailedException  extends IOException {


Mime
View raw message