HDFS-14836. FileIoProvider should not increase FileIoErrors metric in datanode volume metric. Contributed by Aiphago.

Reviewed-by: He Xiaoqiao <hexiaoqiao@apache.org>
(cherry picked from commit 5dd859a8a0)
This commit is contained in:
Wei-Chiu Chuang 2019-09-18 09:34:01 -07:00
parent 2e9482bd20
commit b906f53b0d
1 changed files with 4 additions and 1 deletions

View File

@ -281,7 +281,10 @@ public class FileIoProvider {
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;
}
}