public static UnassignRegionHandler create(HRegionServer server, String encodedName,
    long closeProcId, boolean abort, @Nullable ServerName destination, boolean evictCache,
    long initiatingMasterActiveTime) {
    // Just try our best to determine whether it is for closing meta. It is not the end of the world
    // if we put the handler into a wrong executor.
    Region region = server.getRegion(encodedName);
    EventType eventType = region != null && region.getRegionInfo().isMetaRegion()
      ? EventType.M_RS_CLOSE_META
      : EventType.M_RS_CLOSE_REGION;
    return new UnassignRegionHandler(server, encodedName, closeProcId, abort, destination,
      eventType, initiatingMasterActiveTime, evictCache);
  }
Handles closing of a region on a region server.
<p/>
Just done the same thing with the old {@link CloseRegionHandler}, with some modifications on
fencing and retrying. But we need to keep the {@link CloseRegionHandler} as is to keep compatible
with the zk less assignment for 1.x, otherwise it is not possible to do rolling upgrade.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/UnassignRegionHandler.java