From ec5687b017bd145b3ab4192c7ccd37da7d54ae4f Mon Sep 17 00:00:00 2001 From: Angerszhuuuu Date: Wed, 2 Aug 2023 11:52:17 +0800 Subject: [PATCH] [CELEBORN-871] Init PartitionReader OpenStream failed won't show location info --- .../client/read/WorkerPartitionReader.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/src/main/java/org/apache/celeborn/client/read/WorkerPartitionReader.java b/client/src/main/java/org/apache/celeborn/client/read/WorkerPartitionReader.java index e323fe6e1d5..584ddb9b08d 100644 --- a/client/src/main/java/org/apache/celeborn/client/read/WorkerPartitionReader.java +++ b/client/src/main/java/org/apache/celeborn/client/read/WorkerPartitionReader.java @@ -101,14 +101,14 @@ public void onFailure(int chunkIndex, Throwable e) { TransportClient client = null; try { client = clientFactory.createClient(location.getHost(), location.getFetchPort()); - } catch (InterruptedException ie) { - logger.error("PartitionReader thread interrupted while creating client."); - throw ie; + OpenStream openBlocks = + new OpenStream(shuffleKey, location.getFileName(), startMapIndex, endMapIndex); + ByteBuffer response = client.sendRpcSync(openBlocks.toByteBuffer(), fetchTimeoutMs); + streamHandle = (StreamHandle) Message.decode(response); + } catch (IOException | InterruptedException e) { + logger.error("PartitionReader thread interrupted while creating client.", e); + throw e; } - OpenStream openBlocks = - new OpenStream(shuffleKey, location.getFileName(), startMapIndex, endMapIndex); - ByteBuffer response = client.sendRpcSync(openBlocks.toByteBuffer(), fetchTimeoutMs); - streamHandle = (StreamHandle) Message.decode(response); this.location = location; this.clientFactory = clientFactory;