hbase-commits mailing list archives

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

Branch: refs/heads/branch-1
Commit: 36a48a3cf9b6989350a9c1d0ad179c3043f95b43
Parents: 7fa311a
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 05:55:07 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/36a48a3c/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 3a37429..19ca6e8 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
@@ -2596,7 +2596,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/36a48a3c/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 152379d..aee2fbf 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
@@ -1277,9 +1277,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