adoroszlai commented on code in PR #7316:
URL: https://github.com/apache/ozone/pull/7316#discussion_r1805025932


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/multitenant/RangerClientMultiTenantAccessController.java:
##########
@@ -130,9 +130,12 @@ public 
RangerClientMultiTenantAccessController(OzoneConfiguration conf)
 
     LOG.info("authType = {}, login user = {}", authType, usernameOrPrincipal);
 
+    UserGroupInformation loginUser = UserGroupInformation.getLoginUser();
     client = new RangerClient(rangerHttpsAddress,
         authType, usernameOrPrincipal, passwordOrKeytab,
         rangerServiceName, OzoneConsts.OZONE);
+    // set back the expected login user
+    UserGroupInformation.setLoginUser(loginUser);

Review Comment:
   Should this be wrapped in `try-finally`?



-- 
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]

Reply via email to