You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celeborn.apache.org by zh...@apache.org on 2023/11/15 14:30:51 UTC

(incubator-celeborn) branch main updated: [CELEBORN-1129] More easy to dedicate createReaderWithRetry error

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 758018f51 [CELEBORN-1129] More easy to dedicate createReaderWithRetry error
758018f51 is described below

commit 758018f5125187f467a4889f8aa7aa48e2977aa2
Author: 吴祥平 <wx...@ly.com>
AuthorDate: Wed Nov 15 22:30:39 2023 +0800

    [CELEBORN-1129] More easy to dedicate createReaderWithRetry error
    
    ### What changes were proposed in this pull request?
    Add lastException to CelebornIOException when createReaderWithRetry meet error
    
    ### Why are the changes needed?
    Now we should to find the detail executor to dedicate the detail error msg
    
    ### Does this PR introduce _any_ user-facing change?
    no
    
    ### How was this patch tested?
    
    Closes #2103 from wxplovecc/easy-to-dedicate-error.
    
    Authored-by: 吴祥平 <wx...@ly.com>
    Signed-off-by: zky.zhoukeyong <zk...@alibaba-inc.com>
---
 .../java/org/apache/celeborn/client/read/CelebornInputStream.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 22cc54a5f..29f635380 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
@@ -312,6 +312,7 @@ public abstract class CelebornInputStream extends InputStream {
     }
 
     private PartitionReader createReaderWithRetry(PartitionLocation location) throws IOException {
+      Exception lastException = null;
       while (fetchChunkRetryCnt < fetchChunkMaxRetry) {
         try {
           if (isExcluded(location)) {
@@ -319,6 +320,7 @@ public abstract class CelebornInputStream extends InputStream {
           }
           return createReader(location, fetchChunkRetryCnt, fetchChunkMaxRetry);
         } catch (Exception e) {
+          lastException = e;
           excludeFailedLocation(location, e);
           fetchChunkRetryCnt++;
           if (location.hasPeer()) {
@@ -345,7 +347,7 @@ public abstract class CelebornInputStream extends InputStream {
           }
         }
       }
-      throw new CelebornIOException("createPartitionReader failed! " + location);
+      throw new CelebornIOException("createPartitionReader failed! " + location, lastException);
     }
 
     private ByteBuf getNextChunk() throws IOException {