Github user arunmahadevan commented on a diff in the pull request:
https://github.com/apache/storm/pull/2519#discussion_r162705370
--- Diff:
external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java
---
@@ -215,9 +215,17 @@ private void addTokensToUGI(Subject subject) {
if (allTokens != null) {
for (Token<? extends TokenIdentifier> token :
allTokens) {
try {
+
+ if (token == null) {
+ LOG.debug("Ignoring null token");
+ continue;
+ }
+
LOG.debug("Current user: {}",
UserGroupInformation.getCurrentUser());
- LOG.debug("Token from credential: {} /
{}", token.toString(),
-
token.decodeIdentifier().getUser());
+ LOG.debug("Token from Credentials : {}",
token);
+
+ if (token.decodeIdentifier() != null)
--- End diff --
@omkreddy , toString already handles it and just printing the token would
take care of decoding and printing the user information.
https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/Token.java#L429
---