link3280 commented on a change in pull request #7895: 
[FLINK-11126][YARN][security] Filter out AMRMToken in TaskManager‘s credentials
URL: https://github.com/apache/flink/pull/7895#discussion_r263984332
 
 

 ##########
 File path: flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
 ##########
 @@ -565,7 +565,20 @@ static ContainerLaunchContext createTaskExecutorContext(
                                                new File(fileLocation),
                                                
HadoopUtils.getHadoopConfiguration(flinkConfig));
 
-                               cred.writeTokenStorageToStream(dob);
+                               // Filter out AMRMToken before setting the 
tokens to the TaskManager container context.
+                               Method getAllTokensMethod = 
Credentials.class.getMethod("getAllTokens");
+                               Credentials taskManagerCred = new Credentials();
+                               final Text amRmTokenKind = new 
Text("YARN_AM_RM_TOKEN");
 
 Review comment:
   Good point, I will make it as a `static final` member.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to