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

feiwang 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 a554261f3 [CELEBORN-2006] LifecycleManager should avoid parsing 
shufflePartitionType every time
a554261f3 is described below

commit a554261f32cfd9c7556261f0bbe03ff69bafa66c
Author: sychen <[email protected]>
AuthorDate: Thu May 22 17:23:07 2025 -0700

    [CELEBORN-2006] LifecycleManager should avoid parsing shufflePartitionType 
every time
    
    ### What changes were proposed in this pull request?
    
    ### Why are the changes needed?
    `org.apache.celeborn.client.LifecycleManager.getPartitionType` may be 
called frequently, but in Spark scenario it requires each parsing 
configuration, which is not necessary.
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    GA
    
    Closes #3273 from cxzl25/CELEBORN-2006.
    
    Authored-by: sychen <[email protected]>
    Signed-off-by: Wang, Fei <[email protected]>
---
 .../src/main/scala/org/apache/celeborn/client/LifecycleManager.scala  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala 
b/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
index 6bc12b8e8..1b44c14bb 100644
--- a/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
+++ b/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
@@ -329,8 +329,10 @@ class LifecycleManager(val appUniqueId: String, val conf: 
CelebornConf) extends
     rpcEnv.address.port
   }
 
+  private val partitionType = conf.shufflePartitionType
+
   def getPartitionType(shuffleId: Int): PartitionType = {
-    shufflePartitionType.getOrDefault(shuffleId, conf.shufflePartitionType)
+    shufflePartitionType.getOrDefault(shuffleId, partitionType)
   }
 
   override def receive: PartialFunction[Any, Unit] = {

Reply via email to