Skip to content

Commit 3da23c2

Browse files
authored
HBASE-26726 Allow disable of region warmup before graceful move (#4085)
Signed-off-by: Viraj Jasani<virajjasani@apache.org>
1 parent a9d63e8 commit 3da23c2

File tree

1 file changed

+11
-5
lines changed
  • hbase-server/src/main/java/org/apache/hadoop/hbase/master

1 file changed

+11
-5
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ public class HMaster extends HBaseServerBase<MasterRpcServices> implements Maste
435435
// Cached clusterId on stand by masters to serve clusterID requests from clients.
436436
private final CachedClusterId cachedClusterId;
437437

438+
public static final String WARMUP_BEFORE_MOVE = "hbase.master.warmup.before.move";
439+
private static final boolean DEFAULT_WARMUP_BEFORE_MOVE = true;
440+
438441
/**
439442
* Initializes the HMaster. The steps are as follows:
440443
* <p>
@@ -2196,11 +2199,14 @@ public void move(final byte[] encodedRegionName, byte[] destServerName) throws I
21962199

21972200
TransitRegionStateProcedure proc =
21982201
this.assignmentManager.createMoveRegionProcedure(rp.getRegionInfo(), rp.getDestination());
2199-
// Warmup the region on the destination before initiating the move.
2200-
// A region server could reject the close request because it either does not
2201-
// have the specified region or the region is being split.
2202-
warmUpRegion(rp.getDestination(), hri);
2203-
2202+
if (conf.getBoolean(WARMUP_BEFORE_MOVE, DEFAULT_WARMUP_BEFORE_MOVE)) {
2203+
// Warmup the region on the destination before initiating the move.
2204+
// A region server could reject the close request because it either does not
2205+
// have the specified region or the region is being split.
2206+
LOG.info(getClientIdAuditPrefix() + " move " + rp + ", warming up region on " +
2207+
rp.getDestination());
2208+
warmUpRegion(rp.getDestination(), hri);
2209+
}
22042210
LOG.info(getClientIdAuditPrefix() + " move " + rp + ", running balancer");
22052211
Future<byte[]> future = ProcedureSyncWait.submitProcedure(this.procedureExecutor, proc);
22062212
try {

0 commit comments

Comments
 (0)