Browse Source

HADOOP-3737. Fix CompressedWritable to call Deflater::end to release
compressor memory. Contributed by Grant Glouser.


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

Christopher Douglas 17 years ago
parent
commit
f61023c2f5
2 changed files with 4 additions and 0 deletions
  1. 3 0
      CHANGES.txt
  2. 1 0
      src/core/org/apache/hadoop/io/CompressedWritable.java

+ 3 - 0
CHANGES.txt

@@ -837,6 +837,9 @@ Release 0.18.0 - Unreleased
 
 
     HADOOP-3752. Fix audit logging to record rename events. (cdouglas)
     HADOOP-3752. Fix audit logging to record rename events. (cdouglas)
 
 
+    HADOOP-3737. Fix CompressedWritable to call Deflater::end to release
+    compressor memory. (Grant Glouser via cdouglas)
+
 Release 0.17.2 - Unreleased
 Release 0.17.2 - Unreleased
 
 
   BUG FIXES
   BUG FIXES

+ 1 - 0
src/core/org/apache/hadoop/io/CompressedWritable.java

@@ -73,6 +73,7 @@ public abstract class CompressedWritable implements Writable {
         new DataOutputStream(new DeflaterOutputStream(deflated, deflater));
         new DataOutputStream(new DeflaterOutputStream(deflated, deflater));
       writeCompressed(dout);
       writeCompressed(dout);
       dout.close();
       dout.close();
+      deflater.end();
       compressed = deflated.toByteArray();
       compressed = deflated.toByteArray();
     }
     }
     out.writeInt(compressed.length);
     out.writeInt(compressed.length);