hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1497938 - in /hadoop/common/branches/branch-1: CHANGES.txt src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java src/test/commit-tests
Date Fri, 28 Jun 2013 21:40:08 GMT
Author: acmurthy
Date: Fri Jun 28 21:40:08 2013
New Revision: 1497938

URL: http://svn.apache.org/r1497938
Log:
HADOOP-9665. Fixed BlockDecompressorStream#decompress to return -1 rather than throw EOF at
end of file. Contributed by Zhijie Shen.

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    hadoop/common/branches/branch-1/src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java
    hadoop/common/branches/branch-1/src/test/commit-tests

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1497938&r1=1497937&r2=1497938&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Fri Jun 28 21:40:08 2013
@@ -102,6 +102,9 @@ Release 1.2.1 - Unreleased 
 
     MAPREDUCE-5318. Escape ampersand in JSPUtil. (Bohou Li via acmurthy)
 
+    HADOOP-9665. Fixed BlockDecompressorStream#decompress to return -1 rather
+    than throw EOF at end of file. (Zhijie Shen via acmurthy)
+
 Release 1.2.0 - 2013.05.05
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-1/src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java?rev=1497938&r1=1497937&r2=1497938&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java
(original)
+++ hadoop/common/branches/branch-1/src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java
Fri Jun 28 21:40:08 2013
@@ -81,7 +81,13 @@ public class BlockDecompressorStream ext
         }
       }
       if (decompressor.needsInput()) {
-        int m = getCompressedData();
+        int m;
+        try {
+          m = getCompressedData();
+        } catch (EOFException e) {
+          eof = true;
+          return -1;
+        }
         // Send the read data to the decompressor
         decompressor.setInput(buffer, 0, m);
       }

Modified: hadoop/common/branches/branch-1/src/test/commit-tests
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/test/commit-tests?rev=1497938&r1=1497937&r2=1497938&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/test/commit-tests (original)
+++ hadoop/common/branches/branch-1/src/test/commit-tests Fri Jun 28 21:40:08 2013
@@ -5,6 +5,7 @@
 **/TestAuthenticationFilter.java
 **/TestAuthenticationToken.java
 **/TestAuthenticatedURL.java
+**/TestBlockDecompressorStream.java
 **/TestBloomMapFile.java
 **/TestBuffer.java
 **/TestBytesWritable.java



Mime
View raw message