private static RegionInfo createMergedRegionInfo(final RegionInfo[] regionsToMerge) { return createMergedRegionInfo(regionsToMerge[0], regionsToMerge[1]); }
public MergeTableRegionsProcedure(final MasterProcedureEnv env, final RegionInfo[] regionsToMerge, final boolean forcible) throws IOException { super(env); // Check daughter regions and make sure that we have valid daughter regions // before doing the real work. This check calls the super method #checkOnline also. checkRegionsToMerge(env, regionsToMerge, forcible); // WARN: make sure there is no parent region of the two merging regions in // hbase:meta If exists, fixing up daughters would cause daughter regions(we // have merged one) online again when we restart master, so we should clear // the parent region to prevent the above case // Since HBASE-7721, we don't need fix up daughters any more. so here do nothing this.regionsToMerge = regionsToMerge; this.mergedRegion = createMergedRegionInfo(regionsToMerge); preflightChecks(env, true); this.forcible = forcible; }