hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [3/6] hbase git commit: HBASE-16207 can't restore snapshot without "Admin" permission
Date Tue, 12 Jul 2016 13:29:06 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/51eee9a2
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/51eee9a2
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/51eee9a2

Branch: refs/heads/branch-1.3
Commit: 51eee9a22f1398168bedcb19ab6e2b6a5eb7c4bf
Parents: 0fda2bc
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:04: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/51eee9a2/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 99f1e5b..dd4aa8f 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
@@ -2593,7 +2593,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/51eee9a2/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 f391ca3..f59009e 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
@@ -1275,9 +1275,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