You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/12/17 11:13:16 UTC

[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5233: YARN-11398 DelegationTokenRenewer timeout feautre may cause high utilization of CPU and memory leak

slfan1989 commented on code in PR #5233:
URL: https://github.com/apache/hadoop/pull/5233#discussion_r1051385644


##########
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:
   Set sleep 1000ms, what is the effect of this?



-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org