gaborgsomogyi commented on a change in pull request #18664:
URL: https://github.com/apache/flink/pull/18664#discussion_r802920060



##########
File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
##########
@@ -1245,6 +1258,21 @@ private ApplicationReport startAppMaster(
         return report;
     }
 
+    private void setTokensFor(ContainerLaunchContext containerLaunchContext) 
throws IOException {
+        LOG.info("Adding delegation tokens to the AM container.");
+
+        Credentials credentials = 
UserGroupInformation.getCurrentUser().getCredentials();
+
+        DelegationTokenManager delegationTokenManager =
+                new DelegationTokenManager(flinkConfiguration);
+        delegationTokenManager.obtainDelegationTokens(credentials);

Review comment:
       No, UGI is used which doesn't need to be closed.




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to