petersomogyi commented on code in PR #7059:
URL: https://github.com/apache/hbase/pull/7059#discussion_r2123204689
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java:
##########
@@ -726,12 +726,27 @@ private synchronized long
submitSnapshotProcedure(SnapshotDescription snapshot,
.submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(master,
nonceGroup, nonce) {
@Override
protected void run() throws IOException {
+ TableDescriptor tableDescriptor =
+
master.getTableDescriptors().get(TableName.valueOf(snapshot.getTable()));
+ MasterCoprocessorHost cpHost =
getMaster().getMasterCoprocessorHost();
+ User user = RpcServer.getRequestUser().orElse(null);
+ org.apache.hadoop.hbase.client.SnapshotDescription snapshotDesc =
+ ProtobufUtil.createSnapshotDesc(snapshot);
+
+ if (cpHost != null) {
+ cpHost.preSnapshot(snapshotDesc, tableDescriptor, user);
Review Comment:
That can expected from coprocessors, like AccessDeniedException.
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java:
##########
@@ -726,12 +726,27 @@ private synchronized long
submitSnapshotProcedure(SnapshotDescription snapshot,
.submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(master,
nonceGroup, nonce) {
@Override
protected void run() throws IOException {
+ TableDescriptor tableDescriptor =
+
master.getTableDescriptors().get(TableName.valueOf(snapshot.getTable()));
+ MasterCoprocessorHost cpHost =
getMaster().getMasterCoprocessorHost();
+ User user = RpcServer.getRequestUser().orElse(null);
+ org.apache.hadoop.hbase.client.SnapshotDescription snapshotDesc =
+ ProtobufUtil.createSnapshotDesc(snapshot);
+
+ if (cpHost != null) {
+ cpHost.preSnapshot(snapshotDesc, tableDescriptor, user);
Review Comment:
That can be expected from coprocessors, like AccessDeniedException.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]