Skip to content

Commit bd8a332

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

File tree

1 file changed

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

1 file changed

+12
-4
lines changed

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ public void run() {
396396
// Waiting time of non-meta region's moving for meta regions assignment.
397397
private final long timeoutWaitMetaRegionAssignment;
398398

399+
public static final String WARMUP_BEFORE_MOVE = "hbase.master.warmup.before.move";
400+
private static final boolean DEFAULT_WARMUP_BEFORE_MOVE = true;
401+
399402
public static class RedirectServlet extends HttpServlet {
400403
private static final long serialVersionUID = 2894774810058302473L;
401404
private final int regionServerInfoPort;
@@ -1846,10 +1849,15 @@ public void move(final byte[] encodedRegionName,
18461849
return;
18471850
}
18481851
}
1849-
// warmup the region on the destination before initiating the move. this call
1850-
// is synchronous and takes some time. doing it before the source region gets
1851-
// closed
1852-
serverManager.sendRegionWarmup(rp.getDestination(), hri);
1852+
1853+
if (conf.getBoolean(WARMUP_BEFORE_MOVE, DEFAULT_WARMUP_BEFORE_MOVE)) {
1854+
// warmup the region on the destination before initiating the move. this call
1855+
// is synchronous and takes some time. doing it before the source region gets
1856+
// closed
1857+
LOG.info(getClientIdAuditPrefix() + " move " + rp + ", warming up region on " +
1858+
rp.getDestination());
1859+
serverManager.sendRegionWarmup(rp.getDestination(), hri);
1860+
}
18531861

18541862
// Here wait until all the meta regions are not in transition.
18551863
if (!hri.isMetaRegion() && assignmentManager.getRegionStates().isMetaRegionInTransition()) {

0 commit comments

Comments
 (0)