diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/FileIoProvider.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/FileIoProvider.java index 6349062a40..fc98d3a6b7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/FileIoProvider.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/FileIoProvider.java @@ -279,7 +279,10 @@ public void transferToSocketFully( waitTime, transferTime); profilingEventHook.afterFileIo(volume, TRANSFER, begin, count); } catch (Exception e) { - onFailure(volume, begin); + String em = e.getMessage(); + if (!em.startsWith("Broken pipe") && !em.startsWith("Connection reset")) { + onFailure(volume, begin); + } throw e; } }