zuston commented on a change in pull request #15131:
URL: https://github.com/apache/flink/pull/15131#discussion_r594810045
##########
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:
According to digging into Hadoop source code, i found that `alias` is
just as the key as internal `Credentials` token HashMap.
> In what situation would the identifier not be unique
In our production env, i found that `identifier` is the same in active and
standby namenode HDFS delegation token. But i dont find any detailed Hadoop doc
to support it.
----------------------------------------------------------------
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]