@@ -435,6 +435,9 @@ public class HMaster extends HBaseServerBase<MasterRpcServices> implements Maste
435
435
// Cached clusterId on stand by masters to serve clusterID requests from clients.
436
436
private final CachedClusterId cachedClusterId ;
437
437
438
+ public static final String WARMUP_BEFORE_MOVE = "hbase.master.warmup.before.move" ;
439
+ private static final boolean DEFAULT_WARMUP_BEFORE_MOVE = true ;
440
+
438
441
/**
439
442
* Initializes the HMaster. The steps are as follows:
440
443
* <p>
@@ -2196,11 +2199,14 @@ public void move(final byte[] encodedRegionName, byte[] destServerName) throws I
2196
2199
2197
2200
TransitRegionStateProcedure proc =
2198
2201
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
+ }
2204
2210
LOG .info (getClientIdAuditPrefix () + " move " + rp + ", running balancer" );
2205
2211
Future <byte []> future = ProcedureSyncWait .submitProcedure (this .procedureExecutor , proc );
2206
2212
try {
0 commit comments