[ 
https://issues.apache.org/jira/browse/YARN-11663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17830186#comment-17830186
 ] 

ASF GitHub Bot commented on YARN-11663:
---------------------------------------

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


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/cache/FederationGuavaCache.java:
##########
@@ -60,7 +63,7 @@ public void initCache(Configuration pConf, 
FederationStateStore pStateStore) {
 
     // Initialize Cache.
     cache = CacheBuilder.newBuilder().expireAfterWrite(cacheTimeToLive,
-        TimeUnit.MILLISECONDS).build();
+        TimeUnit.MILLISECONDS).maximumSize(cacheEntityNums).build();

Review Comment:
   Thanks for your suggestion! I will fix it.





> [Federation] Add Cache Entity Nums Limit.
> -----------------------------------------
>
>                 Key: YARN-11663
>                 URL: https://issues.apache.org/jira/browse/YARN-11663
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: federation, yarn
>    Affects Versions: 3.4.0
>            Reporter: Yuan Luo
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2024-03-14-18-12-28-426.png, 
> image-2024-03-14-18-12-49-950.png, image-2024-03-15-10-50-32-860.png
>
>
> !image-2024-03-14-18-12-28-426.png!
> !image-2024-03-14-18-12-49-950.png!
> hi [~slfan1989] After apply this feature to our prod env, I found the memory 
> of the router keeps growing over time. This is because after jobs finished, 
> we won't access the expired key to trigger cleanup mechanism. Is it better to 
> add cache maximum number limit?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to