You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2022/02/01 23:51:33 UTC

[hbase] branch branch-2.5 updated: HBASE-26726 Allow disable of region warmup before graceful move (#4086)

This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.5 by this push:
     new d091751  HBASE-26726 Allow disable of region warmup before graceful move (#4086)
d091751 is described below

commit d091751ab06e9544c42d215d3d6647ef004e966c
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Tue Feb 1 15:38:31 2022 -0800

    HBASE-26726 Allow disable of region warmup before graceful move (#4086)
    
    Signed-off-by: Viraj Jasani<vi...@apache.org>
---
 .../main/java/org/apache/hadoop/hbase/master/HMaster.java | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

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 e205c8d..1f2efd1 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
@@ -410,6 +410,9 @@ public class HMaster extends HRegionServer implements MasterServices {
   // Cached clusterId on stand by masters to serve clusterID requests from clients.
   private final CachedClusterId cachedClusterId;
 
+  public static final String WARMUP_BEFORE_MOVE = "hbase.master.warmup.before.move";
+  private static final boolean DEFAULT_WARMUP_BEFORE_MOVE = true;
+
   /**
    * Initializes the HMaster. The steps are as follows:
    * <p>
@@ -2163,10 +2166,14 @@ public class HMaster extends HRegionServer implements MasterServices {
 
       TransitRegionStateProcedure proc =
           this.assignmentManager.createMoveRegionProcedure(rp.getRegionInfo(), rp.getDestination());
-      // Warmup the region on the destination before initiating the move. this call
-      // is synchronous and takes some time. doing it before the source region gets
-      // closed
-      serverManager.sendRegionWarmup(rp.getDestination(), hri);
+      if (conf.getBoolean(WARMUP_BEFORE_MOVE, DEFAULT_WARMUP_BEFORE_MOVE)) {
+        // Warmup the region on the destination before initiating the move. this call
+        // is synchronous and takes some time. doing it before the source region gets
+        // closed
+        LOG.info(getClientIdAuditPrefix() + " move " + rp + ", warming up region on " +
+          rp.getDestination());
+        serverManager.sendRegionWarmup(rp.getDestination(), hri);
+      }
       LOG.info(getClientIdAuditPrefix() + " move " + rp + ", running balancer");
       Future<byte[]> future = ProcedureSyncWait.submitProcedure(this.procedureExecutor, proc);
       try {