[
https://issues.apache.org/jira/browse/HADOOP-17121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17159949#comment-17159949
]
Steve Loughran commented on HADOOP-17121:
-----------------------------------------
# tag with version, component etc
# is it really 'major'?
It may be that this is deliberately done on some codepaths -that needs to be
looked at
maybe: log @ info, especially if the newer token has different renewer/expires
earlier
> UGI Credentials#addToken silently overrides the token with same service name
> ----------------------------------------------------------------------------
>
> Key: HADOOP-17121
> URL: https://issues.apache.org/jira/browse/HADOOP-17121
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Prabhu Joseph
> Priority: Major
>
> UGI Credentials#addToken silently overrides the token with same service name.
> {code:java}
> public void addToken(Text alias, Token<? extends TokenIdentifier> t) {
> if (t == null) {
> LOG.warn("Null token ignored for " + alias);
> } else if (tokenMap.put(alias, t) != null) {
> // Update private tokens
> Map<Text, Token<? extends TokenIdentifier>> tokensToAdd =
> new HashMap<>();
> for (Map.Entry<Text, Token<? extends TokenIdentifier>> e :
> tokenMap.entrySet()) {
> Token<? extends TokenIdentifier> token = e.getValue();
> if (token.isPrivateCloneOf(alias)) {
> tokensToAdd.put(e.getKey(), t.privateClone(token.getService()));
> }
> }
> tokenMap.putAll(tokensToAdd);
> }
> }
> {code}
>
> There are tokens which does not have service name like YARN_AM_RM_TOKEN,
> Localizer and these tokens gets overridden and causes access issues later
> which are tough to debug.
> 1. Need to check if they can be added with some random unique name.
> 2. Or at least a error message should be logged.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]