hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1540912 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java
Date Tue, 12 Nov 2013 01:33:51 GMT
Author: enis
Date: Tue Nov 12 01:33:51 2013
New Revision: 1540912

URL: http://svn.apache.org/r1540912
Log:
HBASE-9952 Snapshot restore may fail due to NullPointerException

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java?rev=1540912&r1=1540911&r2=1540912&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java
Tue Nov 12 01:33:51 2013
@@ -152,7 +152,9 @@ public class RestoreSnapshotHandler exte
       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.



Mime
View raw message