You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Prabhu Joseph (Jira)" <ji...@apache.org> on 2020/07/09 12:45:00 UTC
[jira] [Created] (HADOOP-17121) UGI Credentials#addToken silently
overrides the token with same service name
Prabhu Joseph created HADOOP-17121:
--------------------------------------
Summary: 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
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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org