slfan1989 commented on code in PR #5233:
URL: https://github.com/apache/hadoop/pull/5233#discussion_r1055236130
##########
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:
This does not seem to be a good way to deal with it through thread sleep.
--
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]