Skip to content

Commit 08c2c65

Browse files
authored
HBASE-26726 Allow disable of region warmup before graceful move (#4086)
Signed-off-by: Viraj Jasani<[email protected]>
1 parent 94e126f commit 08c2c65

File tree

1 file changed

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

1 file changed

+11
-4
lines changed

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,9 @@ public class HMaster extends HRegionServer implements MasterServices {
414414
// Cached clusterId on stand by masters to serve clusterID requests from clients.
415415
private final CachedClusterId cachedClusterId;
416416

417+
public static final String WARMUP_BEFORE_MOVE = "hbase.master.warmup.before.move";
418+
private static final boolean DEFAULT_WARMUP_BEFORE_MOVE = true;
419+
417420
/**
418421
* Initializes the HMaster. The steps are as follows:
419422
* <p>
@@ -2171,10 +2174,14 @@ public void move(final byte[] encodedRegionName, byte[] destServerName) throws H
21712174

21722175
TransitRegionStateProcedure proc =
21732176
this.assignmentManager.createMoveRegionProcedure(rp.getRegionInfo(), rp.getDestination());
2174-
// Warmup the region on the destination before initiating the move. this call
2175-
// is synchronous and takes some time. doing it before the source region gets
2176-
// closed
2177-
serverManager.sendRegionWarmup(rp.getDestination(), hri);
2177+
if (conf.getBoolean(WARMUP_BEFORE_MOVE, DEFAULT_WARMUP_BEFORE_MOVE)) {
2178+
// Warmup the region on the destination before initiating the move. this call
2179+
// is synchronous and takes some time. doing it before the source region gets
2180+
// closed
2181+
LOG.info(getClientIdAuditPrefix() + " move " + rp + ", warming up region on " +
2182+
rp.getDestination());
2183+
serverManager.sendRegionWarmup(rp.getDestination(), hri);
2184+
}
21782185
LOG.info(getClientIdAuditPrefix() + " move " + rp + ", running balancer");
21792186
Future<byte[]> future = ProcedureSyncWait.submitProcedure(this.procedureExecutor, proc);
21802187
try {

0 commit comments

Comments
 (0)