hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1540909 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java
Date Tue, 12 Nov 2013 01:12:43 GMT
Author: enis
Date: Tue Nov 12 01:12:42 2013
New Revision: 1540909

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

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java?rev=1540909&r1=1540908&r2=1540909&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/RestoreSnapshotHandler.java
Tue Nov 12 01:12:42 2013
@@ -157,7 +157,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