HBASE-15873 ACL for snapshot restore / clone is not enforced

This commit is contained in:
tedyu 2016-05-22 19:13:13 -07:00
parent 6738dbadac
commit 34ca6f5069
1 changed files with 4 additions and 4 deletions

View File

@ -723,7 +723,7 @@ public class SnapshotManager extends MasterProcedureManager implements Stoppable
// call coproc pre hook // call coproc pre hook
if (cpHost != null) { if (cpHost != null) {
cpHost.preRestoreSnapshot(reqSnapshot, snapshotTableDesc); cpHost.preRestoreSnapshot(snapshot, snapshotTableDesc);
} }
int tableRegionCount = -1; int tableRegionCount = -1;
@ -767,12 +767,12 @@ public class SnapshotManager extends MasterProcedureManager implements Stoppable
LOG.info("Restore snapshot=" + snapshot.getName() + " as table=" + tableName); LOG.info("Restore snapshot=" + snapshot.getName() + " as table=" + tableName);
if (cpHost != null) { if (cpHost != null) {
cpHost.postRestoreSnapshot(reqSnapshot, snapshotTableDesc); cpHost.postRestoreSnapshot(snapshot, snapshotTableDesc);
} }
} else { } else {
HTableDescriptor htd = new HTableDescriptor(tableName, snapshotTableDesc); HTableDescriptor htd = new HTableDescriptor(tableName, snapshotTableDesc);
if (cpHost != null) { if (cpHost != null) {
cpHost.preCloneSnapshot(reqSnapshot, htd); cpHost.preCloneSnapshot(snapshot, htd);
} }
try { try {
checkAndUpdateNamespaceQuota(manifest, tableName); checkAndUpdateNamespaceQuota(manifest, tableName);
@ -786,7 +786,7 @@ public class SnapshotManager extends MasterProcedureManager implements Stoppable
LOG.info("Clone snapshot=" + snapshot.getName() + " as table=" + tableName); LOG.info("Clone snapshot=" + snapshot.getName() + " as table=" + tableName);
if (cpHost != null) { if (cpHost != null) {
cpHost.postCloneSnapshot(reqSnapshot, htd); cpHost.postCloneSnapshot(snapshot, htd);
} }
} }
} }