adoroszlai commented on code in PR #10872:
URL: https://github.com/apache/ozone/pull/10872#discussion_r3651748293
##########
hadoop-ozone/multitenancy-ranger/src/main/java/org/apache/hadoop/ozone/om/multitenant/RangerClientMultiTenantAccessController.java:
##########
@@ -414,8 +494,8 @@ private Policy fromRangerPolicy(RangerPolicy rangerPolicy) {
policyBuilder.addKeys(resourceNames);
break;
default:
- LOG.warn("Pulled Ranger policy with unknown resource type '{}' with" +
- " names '{}'", resourceType, String.join(",", resourceNames));
+ LOG.warn("Pulled Ranger policy with unknown resource type '{}' with"
+ + " names '{}'", resourceType, String.join(",", resourceNames));
Review Comment:
Please avoid unrelated change.
##########
hadoop-ozone/multitenancy-ranger/src/main/java/org/apache/hadoop/ozone/om/multitenant/RangerClientMultiTenantAccessController.java:
##########
@@ -49,10 +48,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/**
- * Implementation of {@link MultiTenantAccessController} using the
- * {@link RangerClient} to communicate with Ranger.
- */
+
Review Comment:
Why is javadoc comment being removed?
##########
hadoop-ozone/multitenancy-ranger/src/main/java/org/apache/hadoop/ozone/om/multitenant/RangerClientMultiTenantAccessController.java:
##########
@@ -1,5 +1,4 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
+/* Licensed to the Apache Software Foundation (ASF) under one or more
Review Comment:
Please revert this change. Not only is it unnecessary, it will cause
checkstyle failure.
##########
hadoop-ozone/multitenancy-ranger/src/main/java/org/apache/hadoop/ozone/om/multitenant/RangerClientMultiTenantAccessController.java:
##########
@@ -248,11 +289,22 @@ public void deletePolicy(String policyName) throws
IOException {
try {
client.deletePolicy(rangerServiceName, policyName);
} catch (RangerServiceException e) {
+ // Fix 4: if the policy does not exist, silently return.
+ // This makes tenant deletion tolerant of partial previous state.
+ if (isNotFoundException(e)) {
+ LOG.warn("Policy {} not found in Ranger during delete — "
+ + "assuming already deleted.", policyName);
Review Comment:
nit: please do not wrap
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]