private static Path getRegionManifestPath(final Path snapshotDir, final SnapshotRegionManifest manifest) { String regionName = SnapshotManifest.getRegionNameFromManifest(manifest); return new Path(snapshotDir, SNAPSHOT_MANIFEST_PREFIX + regionName); } }
static void deleteRegionManifest(final FileSystem fs, final Path snapshotDir, final SnapshotRegionManifest manifest) throws IOException { String regionName = SnapshotManifest.getRegionNameFromManifest(manifest); fs.delete(new Path(snapshotDir, regionName), true); }
/** * Get all the Region Manifest from the snapshot. * This is an helper to get a map with the region encoded name */ public Map<String, SnapshotRegionManifest> getRegionManifestsMap() { if (regionManifests == null || regionManifests.isEmpty()) return null; HashMap<String, SnapshotRegionManifest> regionsMap = new HashMap<>(regionManifests.size()); for (SnapshotRegionManifest manifest: regionManifests) { String regionName = getRegionNameFromManifest(manifest); regionsMap.put(regionName, manifest); } return regionsMap; }
private static Path getRegionManifestPath(final Path snapshotDir, final SnapshotRegionManifest manifest) { String regionName = SnapshotManifest.getRegionNameFromManifest(manifest); return new Path(snapshotDir, SNAPSHOT_MANIFEST_PREFIX + regionName); } }
static void deleteRegionManifest(final FileSystem fs, final Path snapshotDir, final SnapshotRegionManifest manifest) throws IOException { String regionName = SnapshotManifest.getRegionNameFromManifest(manifest); fs.delete(new Path(snapshotDir, regionName), true); }
/** * Get all the Region Manifest from the snapshot. * This is an helper to get a map with the region encoded name */ public Map<String, SnapshotRegionManifest> getRegionManifestsMap() { if (regionManifests == null || regionManifests.size() == 0) return null; HashMap<String, SnapshotRegionManifest> regionsMap = new HashMap<String, SnapshotRegionManifest>(regionManifests.size()); for (SnapshotRegionManifest manifest: regionManifests) { String regionName = getRegionNameFromManifest(manifest); regionsMap.put(regionName, manifest); } return regionsMap; }