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:
parent
4a80b19d7f
commit
d22c6de648
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue