HBASE-16207 can't restore snapshot without "Admin" permission
This commit is contained in:
parent
7fa311a940
commit
36a48a3cf9
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user