[GitHub] storm pull request #2519: MINOR: Fix possible NullPointerException in Abstra...
Github user arunmahadevan commented on a diff in the pull request: https://github.com/apache/storm/pull/2519#discussion_r162679780 --- Diff: external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java --- @@ -216,8 +216,7 @@ private void addTokensToUGI(Subject subject) { for (Token token : allTokens) { try { LOG.debug("Current user: {}", UserGroupInformation.getCurrentUser()); -LOG.debug("Token from credential: {} / {}", token.toString(), - token.decodeIdentifier().getUser()); +LOG.debug("Extracted Token from Credentials : {}", token); --- End diff -- It appears that the token.toString() does some decoding so might print the user info. ---
[GitHub] storm pull request #2519: MINOR: Fix possible NullPointerException in Abstra...
Github user satishd commented on a diff in the pull request: https://github.com/apache/storm/pull/2519#discussion_r162677211 --- Diff: external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java --- @@ -216,8 +216,7 @@ private void addTokensToUGI(Subject subject) { for (Token token : allTokens) { try { LOG.debug("Current user: {}", UserGroupInformation.getCurrentUser()); -LOG.debug("Token from credential: {} / {}", token.toString(), - token.decodeIdentifier().getUser()); +LOG.debug("Extracted Token from Credentials : {}", token); --- End diff -- token.toString() will not print token.decodeIdentifier().getUser()) which may be useful in debugging. `UserGroupInformation.getCurrentUser().addToken(token)` ignores null tokens. Better to log and skip when `token` is null like below instead of changing the current log statements. ``` for (Token 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()); UserGroupInformation.getCurrentUser().addToken(token); LOG.info("Added delegation tokens to UGI."); } catch (IOException e) { LOG.error("Exception while trying to add tokens to ugi", e); } } ``` ---
[GitHub] storm pull request #2519: MINOR: Fix possible NullPointerException in Abstra...
GitHub user omkreddy opened a pull request: https://github.com/apache/storm/pull/2519 MINOR: Fix possible NullPointerException in AbstractAutoCreds and doc cleanups You can merge this pull request into a Git repository by running: $ git pull https://github.com/omkreddy/storm AUTO-CREDS-CLEANUP Alternatively you can review and apply these changes as the patch at: https://github.com/apache/storm/pull/2519.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2519 commit 469759e48dfc2bc9d3ac6ee6bf26fcca6707b175 Author: Manikumar ReddyDate: 2018-01-19T15:51:49Z MINOR: Fix possible NullPointerException in AbstractAutoCreds logs and doc cleanups ---