@Override
  protected int doWork() throws Exception {
    boolean success;
    try (RegionMover rm = rmbuilder.build()) {
      if (loadUnload.equalsIgnoreCase("load")) {
        success = rm.load();
      } else if (loadUnload.equalsIgnoreCase("unload")) {
        success = rm.unload();
      } else if (loadUnload.equalsIgnoreCase("unload_from_rack")) {
        success = rm.unloadFromRack();
      } else if (loadUnload.equalsIgnoreCase("isolate_regions")) {
        if (rm.isolateRegionIdArray != null && !rm.isolateRegionIdArray.isEmpty()) {
          success = rm.isolateRegions();
        } else {
          LOG.error("Missing -i/--isolate_regions option with '-o isolate_regions' option");
          LOG.error("Use -h or --help for usage instructions");
          printUsage();
          success = false;
        }
      } else {
        printUsage();
        success = false;
      }
    }
    return (success ? 0 : 1);
  }
Remove the servername whose hostname and port portion matches from the passed array of servers.
Returns as side-effect the servername removed.
@return server removed from list of Region Servers
hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java