hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r519431 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/ChecksumFileSystem.java src/java/org/apache/hadoop/fs/FSDataOutputStream.java
Date Sat, 17 Mar 2007 19:51:41 GMT
Author: tomwhite
Date: Sat Mar 17 12:51:40 2007
New Revision: 519431

URL: http://svn.apache.org/viewvc?view=rev&rev=519431
Log:
HADOOP-1129.  Fix DFSClient to not hide IOExceptions in flush method.  Contributed by Hairong
Kuang.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FSDataOutputStream.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=519431&r1=519430&r2=519431
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Sat Mar 17 12:51:40 2007
@@ -73,6 +73,9 @@
     (Espen Amble Kolstad, Andrzej Bialecki, and Owen O'Malley
     via tomwhite)
 
+22. HADOOP-1129.  Fix DFSClient to not hide IOExceptions in
+    flush method.  (Hairong Kuang via tomwhite)
+
 
 Release 0.12.0 - 2007-03-02
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java?view=diff&rev=519431&r1=519430&r2=519431
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java Sat Mar 17 12:51:40
2007
@@ -404,7 +404,7 @@
       if(sums != null) {
         sums.close();
       }
-      super.close();
+      out.close();
     }
     
     public static long getChecksumLength(long size, int bytesPerSum) {

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FSDataOutputStream.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FSDataOutputStream.java?view=diff&rev=519431&r1=519430&r2=519431
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FSDataOutputStream.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FSDataOutputStream.java Sat Mar 17 12:51:40
2007
@@ -43,6 +43,10 @@
       return position;                            // return cached position
     }
     
+    public void close() throws IOException {
+      flush();
+      out.close();
+    }
   }
 
   private static class Buffer extends BufferedOutputStream {
@@ -62,6 +66,11 @@
         buf[count++] = (byte)b;
       }
     }
+
+    public void close() throws IOException {
+      flush();
+      out.close();
+    }
   }
 
   public FSDataOutputStream(OutputStream out, int bufferSize)
@@ -76,5 +85,10 @@
 
   public long getPos() throws IOException {
     return ((Buffer)out).getPos();
+  }
+
+  public void close() throws IOException {
+    flush();
+    out.close();
   }
 }



Mime
View raw message