HBASE-9952 Snapshot restore may fail due to NullPointerException

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1540909 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Enis Soztutar 2013-11-12 01:12:42 +00:00
parent 26ddfe10b6
commit 6ec64a1dc0
1 changed files with 3 additions and 1 deletions

View File

@ -157,7 +157,9 @@ public class RestoreSnapshotHandler extends TableEventHandler implements Snapsho
hris.clear();
if (metaChanges.hasRegionsToAdd()) hris.addAll(metaChanges.getRegionsToAdd());
MetaEditor.addRegionsToMeta(catalogTracker, hris);
MetaEditor.overwriteRegions(catalogTracker, metaChanges.getRegionsToRestore());
if (metaChanges.hasRegionsToRestore()) {
MetaEditor.overwriteRegions(catalogTracker, metaChanges.getRegionsToRestore());
}
metaChanges.updateMetaParentRegions(catalogTracker, hris);
// At this point the restore is complete. Next step is enabling the table.