[
https://issues.apache.org/jira/browse/YARN-11398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17649129#comment-17649129
]
ASF GitHub Bot commented on YARN-11398:
---------------------------------------
slfan1989 commented on code in PR #5233:
URL: https://github.com/apache/hadoop/pull/5233#discussion_r1051761821
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java:
##########
@@ -1017,12 +1017,26 @@ public void run() {
"Exhausted max retry attempts {} in token renewer "
+ "thread for {}",
tokenRenewerThreadRetryMaxAttempts,
evt.getApplicationId());
+ continue;
}
}
} catch (Exception e) {
LOG.info("Problem in submitting renew tasks in token renewer "
+ "thread.", e);
+ continue;
}
+
+ // For normally finished DT renew event, it should be removed from
futures.
+ futures.remove(evt);
+ }
+
+ // If the cluster is idle for some time, futures map is empty or no
event handler found which may still cause high CPU utilization
+ // Therefore a short nap should be added here.
+ try {
+ Thread.sleep(1000);
Review Comment:
Can we give data? The CPU ratio before and after the modification, because
it is given 1000ms, there seems to be no data support for this.
> ResourceManager DelegationTokenRenewer timeout feature may cause high
> utilization of CPU and object leak.
> ---------------------------------------------------------------------------------------------------------
>
> Key: YARN-11398
> URL: https://issues.apache.org/jira/browse/YARN-11398
> Project: Hadoop YARN
> Issue Type: Bug
> Affects Versions: 3.3.1, 3.3.2, 3.3.3, 3.3.4
> Reporter: Daniel Ma
> Priority: Major
> Labels: pull-request-available
>
> ResourceManager DelegationTokenRenewer timeout feature may cause high
> utilization of CPU and object leak.
> 1-If yarn cluster is in idle state, that is almost no token renewer event
> triggered, the DelegationTokenRenewerPoolTracker thread will do nothing but
> dead loop, it will cause high CPU utilization.
> 2-The renewer event is hold in a map named futures, there is no removal logic
> , the map will become increasingly big with time going by.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]