HBASE-20825 Fix pre and post hooks of CloneSnapshot and RestoreSnapshot for Access checks

Signed-off-by: Josh Elser <elserj@apache.org>
Signed-off-by: Ted Yu <tyu@apache.org>
Signed-off-by: zhangduo <zhangduo@apache.org>
This commit is contained in:
Ankit Singhal 2018-06-29 16:32:17 -04:00 committed by zhangduo
parent 4a80b19d7f
commit d22c6de648
1 changed files with 2 additions and 2 deletions

View File

@ -697,7 +697,7 @@ public class SnapshotManager extends MasterProcedureManager implements Stoppable
TableDescriptor htd = TableDescriptorBuilder.copy(tableName, snapshotTableDesc);
org.apache.hadoop.hbase.client.SnapshotDescription snapshotPOJO = null;
if (cpHost != null) {
snapshotPOJO = ProtobufUtil.createSnapshotDesc(reqSnapshot);
snapshotPOJO = ProtobufUtil.createSnapshotDesc(snapshot);
cpHost.preCloneSnapshot(snapshotPOJO, htd);
}
long procId;
@ -827,7 +827,7 @@ public class SnapshotManager extends MasterProcedureManager implements Stoppable
// call Coprocessor pre hook
org.apache.hadoop.hbase.client.SnapshotDescription snapshotPOJO = null;
if (cpHost != null) {
snapshotPOJO = ProtobufUtil.createSnapshotDesc(reqSnapshot);
snapshotPOJO = ProtobufUtil.createSnapshotDesc(snapshot);
cpHost.preRestoreSnapshot(snapshotPOJO, snapshotTableDesc);
}