HBASE-7453 HBASE-7423 snapshot followup (Matteo Bertozzi)

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/hbase-7290@1445842 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Hsieh 2013-02-13 18:50:34 +00:00
parent 9a6a2e87e2
commit 33d7976deb
2 changed files with 7 additions and 7 deletions

View File

@ -169,7 +169,7 @@ public class RestoreSnapshotHelper {
// Remove regions from the current table
monitor.rethrowException();
ModifyRegionUtils.deleteRegions(fs, catalogTracker, regionsToRemove);
ModifyRegionUtils.deleteRegions(conf, fs, catalogTracker, regionsToRemove);
}
// Regions to Add: present in the snapshot but not in the current table

View File

@ -185,11 +185,11 @@ public abstract class ModifyRegionUtils {
* @param catalogTracker the catalog tracker
* @param regions list of {@link HRegionInfo} to delete.
*/
public static void deleteRegions(final FileSystem fs, final CatalogTracker catalogTracker,
final List<HRegionInfo> regions) throws IOException {
public static void deleteRegions(final Configuration conf, final FileSystem fs,
final CatalogTracker catalogTracker, final List<HRegionInfo> regions) throws IOException {
if (regions != null && regions.size() > 0) {
for (HRegionInfo hri: regions) {
deleteRegion(fs, catalogTracker, hri);
deleteRegion(conf, fs, catalogTracker, hri);
}
}
}
@ -202,12 +202,12 @@ public abstract class ModifyRegionUtils {
* @param catalogTracker the catalog tracker
* @param regionInfo {@link HRegionInfo} to delete.
*/
public static void deleteRegion(final FileSystem fs, final CatalogTracker catalogTracker,
final HRegionInfo regionInfo) throws IOException {
public static void deleteRegion(final Configuration conf, final FileSystem fs,
final CatalogTracker catalogTracker, final HRegionInfo regionInfo) throws IOException {
// Remove region from .META.
MetaEditor.deleteRegion(catalogTracker, regionInfo);
// "Delete" region from FS
HFileArchiver.archiveRegion(fs, regionInfo);
HFileArchiver.archiveRegion(conf, fs, regionInfo);
}
}