zuston commented on a change in pull request #15131:
URL: https://github.com/apache/flink/pull/15131#discussion_r594007547
##########
File path: flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
##########
@@ -213,9 +213,9 @@ public static void setTokensFor(
Collection<Token<? extends TokenIdentifier>> usrTok =
currUsr.getTokens();
for (Token<? extends TokenIdentifier> token : usrTok) {
- final Text id = new Text(token.getIdentifier());
- LOG.info("Adding user token " + id + " with " + token);
- credentials.addToken(id, token);
+ final Text alias = new Text(token.getService());
+ LOG.info("Adding user token " + alias + " with " + token);
+ credentials.addToken(alias, token);
Review comment:
I found that the `identifier` is not the only uniq id of the token.
So when getting existed token from
`UserGroupInformation.getCurrentUser().getTokens` and these token may be having
the same `identifier`, this is will cause overwriting tokens by using
`credentials.addToken(identifier, token);`
Acutally, i think we should use `service` as the alias.
More detailed info has been replied in email to you.
----------------------------------------------------------------
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]