hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cnaur...@apache.org
Subject svn commit: r1507479 - in /hadoop/common/branches/branch-1-win: CHANGES.branch-1-win.txt src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java src/test/commit-tests
Date Fri, 26 Jul 2013 21:38:24 GMT
Author: cnauroth
Date: Fri Jul 26 21:38:24 2013
New Revision: 1507479

URL: http://svn.apache.org/r1507479
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-win/CHANGES.branch-1-win.txt
    hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java
    hadoop/common/branches/branch-1-win/src/test/commit-tests

Modified: hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt?rev=1507479&r1=1507478&r2=1507479&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt (original)
+++ hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt Fri Jul 26 21:38:24 2013
@@ -472,3 +472,6 @@ Branch-hadoop-1-win (branched from branc
 
     HADOOP-9507. LocalFileSystem rename() is broken in some cases when
     destination exists. (cnauroth)
+
+    HADOOP-9665. Fixed BlockDecompressorStream#decompress to return -1 rather
+    than throw EOF at end of file. (Zhijie Shen via acmurthy)

Modified: hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java?rev=1507479&r1=1507478&r2=1507479&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java
(original)
+++ hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/io/compress/BlockDecompressorStream.java
Fri Jul 26 21:38:24 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-win/src/test/commit-tests
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/test/commit-tests?rev=1507479&r1=1507478&r2=1507479&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/src/test/commit-tests (original)
+++ hadoop/common/branches/branch-1-win/src/test/commit-tests Fri Jul 26 21:38:24 2013
@@ -5,6 +5,7 @@
 **/TestAuthenticationFilter.java
 **/TestAuthenticationToken.java
 **/TestAuthenticatedURL.java
+**/TestBlockDecompressorStream.java
 **/TestBloomMapFile.java
 **/TestBuffer.java
 **/TestBytesWritable.java



Mime
View raw message