Skip to content

Commit

Permalink
YARN-11384: NPE in DelegationTokenRenewer causes all subsequent apps …
Browse files Browse the repository at this point in the history
…to fail with "Timer already cancelled" (apache#7404) Contributed by Cheng Pan.

Reviewed-by: Shilun Fan <[email protected]>
Signed-off-by: Shilun Fan <[email protected]>
  • Loading branch information
pan3793 authored Feb 19, 2025
1 parent 744fe66 commit 06ff1b6
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -807,10 +807,13 @@ private void cancelToken(DelegationTokenToRenew t) {
private void removeFailedDelegationToken(DelegationTokenToRenew t) {
Collection<ApplicationId> applicationIds = t.referringAppIds;
synchronized (applicationIds) {
LOG.error("removing failed delegation token for appid=" + applicationIds
+ ";t=" + t.token.getService());
LOG.error("removing failed delegation token for appid={};t={}",
applicationIds, t.token.getService());
for (ApplicationId applicationId : applicationIds) {
appTokens.get(applicationId).remove(t);
Set<DelegationTokenToRenew> tokens = appTokens.get(applicationId);
if (tokens != null && !tokens.isEmpty()) {
tokens.remove(t);
}
}
}
allTokens.remove(t.token);
Expand Down

0 comments on commit 06ff1b6

Please sign in to comment.