Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ public void run() {
// Waiting time of non-meta region's moving for meta regions assignment.
private final long timeoutWaitMetaRegionAssignment;

public static final String WARMUP_BEFORE_MOVE = "hbase.master.warmup.before.move";
private static final boolean DEFAULT_WARMUP_BEFORE_MOVE = true;

public static class RedirectServlet extends HttpServlet {
private static final long serialVersionUID = 2894774810058302473L;
private final int regionServerInfoPort;
Expand Down Expand Up @@ -1846,10 +1849,15 @@ public void move(final byte[] encodedRegionName,
return;
}
}
// 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);
}

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