Skip to content

Commit 5dd859a

Browse files
committed
HDFS-14836. FileIoProvider should not increase FileIoErrors metric in datanode volume metric. Contributed by Aiphago.
Reviewed-by: He Xiaoqiao <[email protected]>
1 parent 8d9e9ec commit 5dd859a

File tree

1 file changed

+4
-1
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode

1 file changed

+4
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/FileIoProvider.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ public void transferToSocketFully(
279279
waitTime, transferTime);
280280
profilingEventHook.afterFileIo(volume, TRANSFER, begin, count);
281281
} catch (Exception e) {
282-
onFailure(volume, begin);
282+
String em = e.getMessage();
283+
if (!em.startsWith("Broken pipe") && !em.startsWith("Connection reset")) {
284+
onFailure(volume, begin);
285+
}
283286
throw e;
284287
}
285288
}

0 commit comments

Comments
 (0)