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;