[ 
https://issues.apache.org/jira/browse/YARN-5305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17828431#comment-17828431
 ] 

ASF GitHub Bot commented on YARN-5305:
--------------------------------------

K0K0V0K commented on code in PR #6625:
URL: https://github.com/apache/hadoop/pull/6625#discussion_r1530670402


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/AppLogAggregatorImpl.java:
##########
@@ -286,7 +294,13 @@ private void uploadLogsForContainers(boolean appFinished)
     }
 
     addCredentials();
-
+    if (UserGroupInformation.isSecurityEnabled()) {

Review Comment:
   Nit: maybe we can move this if into the removeExpiredDelegationTokens method 
as an early return, so it will be more similar to the addCredentials() method





> Yarn Application Log Aggregation fails due to NM can not get correct HDFS 
> delegation token III
> ----------------------------------------------------------------------------------------------
>
>                 Key: YARN-5305
>                 URL: https://issues.apache.org/jira/browse/YARN-5305
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: yarn
>            Reporter: Xianyin Xin
>            Assignee: Peter Szucs
>            Priority: Major
>              Labels: pull-request-available
>
> Different with YARN-5098 and YARN-5302, this problem happens when AM submits 
> a startContainer request with a new HDFS token (say, tokenB) which is not 
> managed by YARN, so two tokens exist in the credentials of the user on NM, 
> one is tokenB, the other is the one renewed on RM (tokenA). If tokenB is 
> selected when connect to HDFS and tokenB expires, exception happens.
> Supplementary: this problem happen due to that AM didn't use the service name 
> as the token alias in credentials, so two tokens for the same service can 
> co-exist in one credentials. TokenSelector can only select the first matched 
> token, it doesn't care if the token is valid or not.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to