You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sl...@apache.org on 2025/02/19 23:46:22 UTC
(hadoop) branch trunk updated: YARN-11384: NPE in DelegationTokenRenewer causes all subsequent apps to fail with "Timer already cancelled" (#7404) Contributed by Cheng Pan.
This is an automated email from the ASF dual-hosted git repository.
slfan1989 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 06ff1b69c76 YARN-11384: NPE in DelegationTokenRenewer causes all subsequent apps to fail with "Timer already cancelled" (#7404) Contributed by Cheng Pan.
06ff1b69c76 is described below
commit 06ff1b69c76713d0ea3b82fb6b8890a3b70205f2
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Thu Feb 20 07:46:16 2025 +0800
YARN-11384: NPE in DelegationTokenRenewer causes all subsequent apps to fail with "Timer already cancelled" (#7404) Contributed by Cheng Pan.
Reviewed-by: Shilun Fan <sl...@apache.org>
Signed-off-by: Shilun Fan <sl...@apache.org>
---
.../server/resourcemanager/security/DelegationTokenRenewer.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
index be95572f92a..8e1214afc80 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
@@ -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);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org