hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lium...@apache.org
Subject hadoop git commit: HDFS-11253. FileInputStream leak on failure path in BlockSender. Contributed by Arpit Agarwal
Date Thu, 15 Dec 2016 23:43:50 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk ac0d402c6 -> 6fce19154


HDFS-11253. FileInputStream leak on failure path in BlockSender. Contributed by Arpit Agarwal


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6fce1915
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6fce1915
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6fce1915

Branch: refs/heads/trunk
Commit: 6fce19154906cb271b637b46896a34e7701a7bac
Parents: ac0d402
Author: Mingliang Liu <liuml07@apache.org>
Authored: Thu Dec 15 15:39:15 2016 -0800
Committer: Mingliang Liu <liuml07@apache.org>
Committed: Thu Dec 15 15:39:15 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6fce1915/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
index d7aebd8..99597dc 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
@@ -407,6 +407,8 @@ class BlockSender implements java.io.Closeable {
           blockIn, checksumIn, volumeRef, fileIoProvider);
     } catch (IOException ioe) {
       IOUtils.closeStream(this);
+      org.apache.commons.io.IOUtils.closeQuietly(blockIn);
+      org.apache.commons.io.IOUtils.closeQuietly(checksumIn);
       throw ioe;
     }
   }


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


Mime
View raw message