hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r831184 - in /hadoop/common/branches/branch-0.20: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
Date Fri, 30 Oct 2009 02:10:33 GMT
Author: szetszwo
Date: Fri Oct 30 02:10:32 2009
New Revision: 831184

URL: http://svn.apache.org/viewvc?rev=831184&view=rev
Log:
HDFS-732. DFSClient.DFSOutputStream.close() should throw an exception if the stream cannot
be closed successfully.

Modified:
    hadoop/common/branches/branch-0.20/CHANGES.txt
    hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java

Modified: hadoop/common/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/CHANGES.txt?rev=831184&r1=831183&r2=831184&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20/CHANGES.txt Fri Oct 30 02:10:32 2009
@@ -51,6 +51,9 @@
 
     HDFS-723. Fix deadlock in DFSClient#DFSOutputStream. (hairong)
 
+    HDFS-732. DFSClient.DFSOutputStream.close() should throw an exception if
+    the stream cannot be closed successfully.  (szetszwo)
+
 Release 0.20.1 - 2009-09-01
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java?rev=831184&r1=831183&r2=831184&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java (original)
+++ hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java Fri
Oct 30 02:10:32 2009
@@ -3154,8 +3154,13 @@
      */
     @Override
     public void close() throws IOException {
-      if(closed)
-        return;
+      if (closed) {
+        IOException e = lastException;
+        if (e == null)
+          return;
+        else
+          throw e;
+      }
       closeInternal();
       leasechecker.remove(src);
       



Mime
View raw message