You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ta...@apache.org on 2020/06/15 00:16:46 UTC

[hadoop] branch trunk updated: HDFS-15403. NPE in FileIoProvider#transferToSocketFully. Contributed by hemanthboyina.

This is an automated email from the ASF dual-hosted git repository.

tasanuma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new f41a144  HDFS-15403. NPE in FileIoProvider#transferToSocketFully. Contributed by hemanthboyina.
f41a144 is described below

commit f41a144077fc0e2d32072e0d088c1abd1897cee5
Author: Takanobu Asanuma <ta...@apache.org>
AuthorDate: Mon Jun 15 09:15:53 2020 +0900

    HDFS-15403. NPE in FileIoProvider#transferToSocketFully. Contributed by hemanthboyina.
---
 .../org/apache/hadoop/hdfs/server/datanode/FileIoProvider.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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 fc98d3a..cf69029 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
@@ -280,7 +280,12 @@ public class FileIoProvider {
       profilingEventHook.afterFileIo(volume, TRANSFER, begin, count);
     } catch (Exception e) {
       String em = e.getMessage();
-      if (!em.startsWith("Broken pipe") && !em.startsWith("Connection reset")) {
+      if (em != null) {
+        if (!em.startsWith("Broken pipe")
+            && !em.startsWith("Connection reset")) {
+          onFailure(volume, begin);
+        }
+      } else {
         onFailure(volume, begin);
       }
       throw e;


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org