This is an automated email from the ASF dual-hosted git repository.

nicholasjiang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new 32d73c0d7 [CELEBORN-1619][CELEBORN-474][FOLLOWUP] TagsManager uses 
JavaUtils#newConcurrentHashMap to speed up ConcurrentHashMap#computeIfAbsent
32d73c0d7 is described below

commit 32d73c0d7557a445efa4e2f54b50d92b9a321a14
Author: SteNicholas <[email protected]>
AuthorDate: Mon Nov 18 16:31:47 2024 +0800

    [CELEBORN-1619][CELEBORN-474][FOLLOWUP] TagsManager uses 
JavaUtils#newConcurrentHashMap to speed up ConcurrentHashMap#computeIfAbsent
    
    ### What changes were proposed in this pull request?
    
    `TagsManager` uses `JavaUtils#newConcurrentHashMap` to speed up 
`ConcurrentHashMap#computeIfAbsent`.
    
    Follow up #2844.
    
    ### Why are the changes needed?
    
    Celeborn supports JDK8, which could meet the bug mentioned in 
[JDK-8161372](https://bugs.openjdk.org/browse/JDK-8161372). Therefore, it's 
better to use `JavaUtils#newConcurrentHashMap` to speed up 
`ConcurrentHashMap#computeIfAbsent`.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    CI.
    
    Closes #2922 from SteNicholas/CELEBORN-1619.
    
    Authored-by: SteNicholas <[email protected]>
    Signed-off-by: SteNicholas <[email protected]>
---
 .../org/apache/celeborn/service/deploy/master/tags/TagsManager.scala    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/master/src/main/scala/org/apache/celeborn/service/deploy/master/tags/TagsManager.scala
 
b/master/src/main/scala/org/apache/celeborn/service/deploy/master/tags/TagsManager.scala
index 42328a8c9..fdc6442b2 100644
--- 
a/master/src/main/scala/org/apache/celeborn/service/deploy/master/tags/TagsManager.scala
+++ 
b/master/src/main/scala/org/apache/celeborn/service/deploy/master/tags/TagsManager.scala
@@ -43,7 +43,7 @@ class TagsManager(configService: Option[ConfigService]) 
extends Logging {
     configService match {
       case Some(cs) =>
         // TODO: Make configStore.getTags return ConcurrentMap
-        new ConcurrentHashMap(cs.getSystemConfigFromCache.getTags)
+        JavaUtils.newConcurrentHashMap(cs.getSystemConfigFromCache.getTags)
       case _ =>
         defaultTagStore
     }

Reply via email to