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:18:50 UTC

[hadoop] branch branch-3.2 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 branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


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

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

    HDFS-15403. NPE in FileIoProvider#transferToSocketFully. Contributed by hemanthboyina.
    
    (cherry picked from commit f41a144077fc0e2d32072e0d088c1abd1897cee5)
---
 .../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 cb2309d..1bdb8aa 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
@@ -282,7 +282,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