hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinayakum...@apache.org
Subject [24/50] hadoop git commit: HDFS-8253. DFSStripedOutputStream.closeThreads releases cellBuffers multiple times. Contributed by Kai Sasaki
Date Fri, 14 Aug 2015 10:54:38 GMT
HDFS-8253. DFSStripedOutputStream.closeThreads releases cellBuffers multiple times.  Contributed
by Kai Sasaki


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

Branch: refs/heads/HDFS-7285-REBASE
Commit: 38edd10bb55c57d428e6b342fec1659292e433a0
Parents: 92c2f31
Author: Tsz-Wo Nicholas Sze <szetszwo@hortonworks.com>
Authored: Wed Jun 24 23:39:05 2015 +0800
Committer: Vinayakumar B <vinayakumarb@apache.org>
Committed: Thu Aug 13 17:13:53 2015 +0530

----------------------------------------------------------------------
 .../hadoop-hdfs/CHANGES-HDFS-EC-7285.txt        |  3 +++
 .../hadoop/hdfs/DFSStripedOutputStream.java     | 27 +++++++++++---------
 2 files changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/38edd10b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt
index 7f62425..f880425 100755
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt
@@ -320,3 +320,6 @@
 
     HDFS-8567. Erasure Coding: SafeMode handles file smaller than a full stripe.
     (Walter Su via jing9)
+
+    HDFS-8253. DFSStripedOutputStream.closeThreads releases cellBuffers
+    multiple times.  (Kai Sasaki via szetszwo)

http://git-wip-us.apache.org/repos/asf/hadoop/blob/38edd10b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java
index 90a8ffe..a18a30b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java
@@ -494,21 +494,24 @@ public class DFSStripedOutputStream extends DFSOutputStream {
   @Override
   protected void closeThreads(boolean force) throws IOException {
     final MultipleIOException.Builder b = new MultipleIOException.Builder();
-    for (StripedDataStreamer streamer : streamers) {
-      try {
-        streamer.close(force);
-        streamer.join();
-        streamer.closeSocket();
-      } catch(Exception e) {
+    try {
+      for (StripedDataStreamer streamer : streamers) {
         try {
-          handleStreamerFailure("force=" + force, e);
-        } catch(IOException ioe) {
-          b.add(ioe);
+          streamer.close(force);
+          streamer.join();
+          streamer.closeSocket();
+        } catch (Exception e) {
+          try {
+            handleStreamerFailure("force=" + force, e);
+          } catch (IOException ioe) {
+            b.add(ioe);
+          }
+        } finally {
+          streamer.setSocketToNull();
         }
-      } finally {
-        streamer.setSocketToNull();
-        setClosed();
       }
+    } finally {
+      setClosed();
     }
     final IOException ioe = b.build();
     if (ioe != null) {


Mime
View raw message