maheshbandal15 commented on code in PR #1310:
URL: https://github.com/apache/ranger/pull/1310#discussion_r4273452174
##########
hdfs-agent/src/main/java/org/apache/ranger/authorization/hadoop/OperationOptimizer.java:
##########
@@ -121,6 +121,30 @@ private OptimizedAuthzContext optimizeCreateOp() {
}
private OptimizedAuthzContext optimizeDeleteOp() {
+ return optimizeDirectoryTreeMutationOp();
+ }
+
+ private OptimizedAuthzContext optimizeRenameOp() {
+ if (inode != null && inode.isDirectory()) {
+ return optimizeDirectoryTreeMutationOp();
+ }
+
+ INode nodeToAuthorize = getINodeToAuthorize();
+
+ if (nodeToAuthorize == null) {
+ return OPT_BYPASS_AUTHZ;
+ }
+
+ if (!nodeToAuthorize.isDirectory()) {
+ LOG.debug("nodeToCheck is not a directory for a rename operation!
Optimization skipped");
+
+ return null;
+ }
Review Comment:
This debug log matches the old log line in the same function. Refer
https://github.com/apache/ranger/pull/1310/changes#diff-ff68357aef50420ca6084e806a9658427c2b6f2e658d33f9c2ae653fd3429c9aL159
Changing it will deviate debug logs lookup for older versions.
--
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]