hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [4/6] hbase git commit: HBASE-16207 can't restore snapshot without "Admin" permission
Date Tue, 12 Jul 2016 13:29:07 GMT
HBASE-16207 can't restore snapshot without "Admin" permission


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9b5f19ea
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9b5f19ea
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9b5f19ea

Branch: refs/heads/branch-1.2
Commit: 9b5f19eaebfb6099de9edd1204be7da9fc4c6a34
Parents: b96b042
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Tue Jul 12 05:55:07 2016 -0700
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Tue Jul 12 06:13:56 2016 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/master/HMaster.java    | 2 +-
 .../java/org/apache/hadoop/hbase/master/MasterRpcServices.java   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/9b5f19ea/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index 36a0693..da62710 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -2498,7 +2498,7 @@ public class HMaster extends HRegionServer implements MasterServices,
Server {
    * @throws IOException if the namespace manager is not ready yet.
    * @throws NamespaceNotFoundException if the namespace does not exists
    */
-  private void ensureNamespaceExists(final String name)
+  protected void ensureNamespaceExists(final String name)
       throws IOException, NamespaceNotFoundException {
     checkNamespaceManagerReady();
     NamespaceDescriptor nsd = tableNamespaceManager.get(name);

http://git-wip-us.apache.org/repos/asf/hbase/blob/9b5f19ea/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index c540a3e..c1472c9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -1258,9 +1258,9 @@ public class MasterRpcServices extends RSRpcServices
       master.checkInitialized();
       master.snapshotManager.checkSnapshotSupport();
 
-    // ensure namespace exists
+      // ensure namespace exists
       TableName dstTable = TableName.valueOf(request.getSnapshot().getTable());
-      master.getNamespaceDescriptor(dstTable.getNamespaceAsString());
+      master.ensureNamespaceExists(dstTable.getNamespaceAsString());
 
       SnapshotDescription reqSnapshot = request.getSnapshot();
       master.snapshotManager.restoreSnapshot(reqSnapshot);


Mime
View raw message