@Override
  public Boolean call() throws IOException, InterruptedException {
    boolean moved = false;
    int count = 0;
    int retries = admin.getConfiguration().getInt(RegionMover.MOVE_RETRIES_MAX_KEY,
      RegionMover.DEFAULT_MOVE_RETRIES_MAX);
    int maxWaitInSeconds = admin.getConfiguration().getInt(RegionMover.MOVE_WAIT_MAX_KEY,
      RegionMover.DEFAULT_MOVE_WAIT_MAX);
    long startTime = EnvironmentEdgeManager.currentTime();
    boolean sameServer = true;
    // Assert we can scan the region in its current location
    isSuccessfulScan(region);
    LOG.info("Moving region: {} from {} to {}", region.getRegionNameAsString(), sourceServer,
      targetServer);
    while (count < retries && sameServer) {
      if (count > 0) {
        LOG.debug("Retry {} of maximum {} for region: {}", count, retries,
          region.getRegionNameAsString());
      }
      count = count + 1;
      admin.move(region.getEncodedNameAsBytes(), targetServer);
      long maxWait = startTime + (maxWaitInSeconds * 1000);
      while (EnvironmentEdgeManager.currentTime() < maxWait) {
        sameServer = isSameServer(region, sourceServer);
        if (!sameServer) {
          break;
        }
        Thread.sleep(1000);
      }
    }
    if (sameServer) {
      LOG.error("Region: {} stuck on {} for {} sec , newServer={}", region.getRegionNameAsString(),
        this.sourceServer, getTimeDiffInSec(startTime), this.targetServer);
    } else {
      isSuccessfulScan(region);
      LOG.info("Moved Region {} , cost (sec): {}", region.getRegionNameAsString(),
        getTimeDiffInSec(startTime));
      moved = true;
      movedRegions.add(region);
    }
    return moved;
  }
Move Regions and make sure that they are up on the target server.If a region movement fails we
exit as failure
hbase-server/src/main/java/org/apache/hadoop/hbase/util/MoveWithAck.java