/** * Restore region by removing files not in the snapshot * and adding the missing ones from the snapshot. */ private void restoreRegion(final RegionInfo regionInfo, final SnapshotRegionManifest regionManifest) throws IOException { restoreRegion(regionInfo, regionManifest, new Path(tableDir, regionInfo.getEncodedName())); }
/** * Restore mob region by removing files not in the snapshot * and adding the missing ones from the snapshot. */ private void restoreMobRegion(final RegionInfo regionInfo, final SnapshotRegionManifest regionManifest) throws IOException { if (regionManifest == null) { return; } restoreRegion(regionInfo, regionManifest, MobUtils.getMobRegionPath(conf, tableDesc.getTableName())); }
/** * Restore specified regions by restoring content to the snapshot state. */ private void restoreHdfsRegions(final List<HRegionInfo> regions) throws IOException { if (regions == null || regions.size() == 0) return; for (HRegionInfo hri: regions) restoreRegion(hri); }