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>
This commit is contained in:
parent
632aaef88b
commit
34e23fe425
|
@ -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