private Callable<Boolean> getRegionsMovePlan(boolean moveMetaRegion) {
    return () -> {
      try {
        List<RegionInfo> regionsToMove = readRegionsFromFile(filename);
        if (regionsToMove.isEmpty()) {
          LOG.info("No regions to load.Exiting");
          return true;
        }
        Optional<RegionInfo> metaRegion = getMetaRegionInfoIfToBeMoved(regionsToMove);
        if (moveMetaRegion) {
          if (metaRegion.isPresent()) {
            loadRegions(Collections.singletonList(metaRegion.get()));
          }
        } else {
          metaRegion.ifPresent(regionsToMove::remove);
          loadRegions(regionsToMove);
        }
      } catch (Exception e) {
        LOG.error("Error while loading regions to " + hostname, e);
        return false;
      }
      return true;
    };
  }
Loads the specified {@link #hostname} with regions listed in the {@link #filename} RegionMover
Object has to be created using {@link #RegionMover(RegionMoverBuilder)}
@return true if loading succeeded, false otherwise
hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java