Hexiaoqiao commented on code in PR #4198:
URL: https://github.com/apache/hadoop/pull/4198#discussion_r878878214
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java:
##########
@@ -523,9 +528,14 @@ private void
handleAppSubmitEvent(AbstractDelegationTokenRenewerAppEvent evt)
tokenConf = getConfig();
}
dttr = new DelegationTokenToRenew(Arrays.asList(applicationId),
token,
- tokenConf, now, shouldCancelAtEnd, evt.getUser());
+ tokenConf, tokenExpiredTime.get(), shouldCancelAtEnd,
evt.getUser());
+
try {
- renewToken(dttr);
+ // if expire date is not greater than now, renew token.
+ // add extra time in case of clock skew
+ if (tokenExpiredTime.get() <= now + clockSkewExtraTime) {
Review Comment:
Sorry I didn't get why add clock skew condition check here. I think we
should file another JIRA to fix if it is issue indeed.
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java:
##########
@@ -627,6 +638,7 @@ private boolean skipTokenRenewal(Token<?> token)
if (identifier == null) {
return false;
}
+ expiredTime.set(identifier.getMaxDate());
Text renewer = identifier.getRenewer();
return (renewer != null && renewer.toString().equals(""));
Review Comment:
Just suggest to check if delegation token need to renew while app is just
submitted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]