Ver Fonte

HADOOP-4195. Close compressor before returning to codec pool.
From: Arun Murthy <acmurthy@apache.org>


git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@696534 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley há 16 anos atrás
pai
commit
a48618c39d
2 ficheiros alterados com 6 adições e 3 exclusões
  1. 3 0
      CHANGES.txt
  2. 3 3
      src/core/org/apache/hadoop/io/SequenceFile.java

+ 3 - 0
CHANGES.txt

@@ -601,6 +601,9 @@ Trunk (unreleased changes)
     the interfaces to the serializer and de-serializer.
     (Zheng Shao via dhruba)
 
+    HADOOP-4195. Close compressor before returning to codec pool.
+    (acmurthy via omalley)
+
 Release 0.18.1 - 2008-09-17
 
   IMPROVEMENTS

+ 3 - 3
src/core/org/apache/hadoop/io/SequenceFile.java

@@ -943,15 +943,15 @@ public class SequenceFile {
     
     /** Close the file. */
     public synchronized void close() throws IOException {
-      CodecPool.returnCompressor(compressor);
-      compressor = null;
-      
       keySerializer.close();
       uncompressedValSerializer.close();
       if (compressedValSerializer != null) {
         compressedValSerializer.close();
       }
 
+      CodecPool.returnCompressor(compressor);
+      compressor = null;
+      
       if (out != null) {
         
         // Close the underlying stream iff we own it...