openinx commented on a change in pull request #336: HBASE-22580 Add a table attribute to make user scan snapshot feature configurable for table URL: https://github.com/apache/hbase/pull/336#discussion_r297129520
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SnapshotScannerHDFSAclController.java ########## @@ -263,10 +265,36 @@ public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx, } } + @Override + public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx, + TableName tableName, TableDescriptor oldDescriptor, TableDescriptor currentDescriptor) + throws IOException { + if (checkTable(currentDescriptor, () -> "modifyTable " + tableName) + && !hdfsAclHelper.isTableUserScanSnapshotEnabled(oldDescriptor)) { + hdfsAclHelper.createTableDirectories(tableName); + Set<String> users = new HashSet<>(); Review comment: Abstract an small method here ? I saw many places has the logic: to pick up all the users who has the read permission on table / ns / global etc... ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services