You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celeborn.apache.org by ni...@apache.org on 2024/04/12 06:07:04 UTC

(celeborn) branch main updated: [CELEBORN-1381] Avoid construct TransportConf when creating CelebornInputStream

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 a88f972db [CELEBORN-1381] Avoid construct TransportConf when creating CelebornInputStream
a88f972db is described below

commit a88f972dbd0a1f432bb5a2c31d0bf936dd8b1aee
Author: onebox-li <ly...@163.com>
AuthorDate: Fri Apr 12 14:06:54 2024 +0800

    [CELEBORN-1381] Avoid construct TransportConf when creating CelebornInputStream
    
    ### What changes were proposed in this pull request?
    Get retryWaitMs directly from conf when creating CelebornInputStream.
    
    ### Why are the changes needed?
    It is unnecessary to construct TransportConf here.
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    Manual test.
    
    Closes #2453 from onebox-li/CELEBORN-1381.
    
    Authored-by: onebox-li <ly...@163.com>
    Signed-off-by: SteNicholas <pr...@163.com>
---
 .../java/org/apache/celeborn/client/read/CelebornInputStream.java    | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/client/src/main/java/org/apache/celeborn/client/read/CelebornInputStream.java b/client/src/main/java/org/apache/celeborn/client/read/CelebornInputStream.java
index 4312272dd..798128d2f 100644
--- a/client/src/main/java/org/apache/celeborn/client/read/CelebornInputStream.java
+++ b/client/src/main/java/org/apache/celeborn/client/read/CelebornInputStream.java
@@ -38,7 +38,6 @@ import org.apache.celeborn.client.compress.Decompressor;
 import org.apache.celeborn.common.CelebornConf;
 import org.apache.celeborn.common.exception.CelebornIOException;
 import org.apache.celeborn.common.network.client.TransportClientFactory;
-import org.apache.celeborn.common.network.util.TransportConf;
 import org.apache.celeborn.common.protocol.*;
 import org.apache.celeborn.common.unsafe.Platform;
 import org.apache.celeborn.common.util.ExceptionMaker;
@@ -216,9 +215,7 @@ public abstract class CelebornInputStream extends InputStream {
       } else {
         fetchChunkMaxRetry = conf.clientFetchMaxRetriesForEachReplica();
       }
-      TransportConf transportConf =
-          Utils.fromCelebornConf(conf, TransportModuleConstants.DATA_MODULE, 0);
-      retryWaitMs = transportConf.ioRetryWaitTimeMs();
+      this.retryWaitMs = conf.networkIoRetryWaitMs(TransportModuleConstants.DATA_MODULE);
       this.callback = metricsCallback;
       this.exceptionMaker = exceptionMaker;
       this.partitionId = partitionId;