[ 
https://issues.apache.org/jira/browse/HADOOP-6315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799677#action_12799677
 ] 

Chris Douglas commented on HADOOP-6315:
---------------------------------------

HADOOP-5281 carried over the semantics from the existing code, i.e. returned 
BuiltInZlibInflater when the native libs aren't loaded:
{noformat}
-    return ZlibFactory.getZlibDecompressorType(conf);
+    return ZlibFactory.isNativeZlibLoaded(conf)
+      ? GzipZlibDecompressor.class
+      : BuiltInZlibInflater.class;
{noformat}
which made the fix incomplete. Unfortunately, extending HADOOP-5281 to support 
the standard platform (i.e. writing the corresponding 
BuiltInGzipInflater/Deflater passing nowrap == true) isn't possible either, 
since the GZIP\*Streams [don't expose constructors taking 
Inflaters/Deflaters|http://bugs.sun.com/view_bug.do?bug_id=6282206] (so it's 
not possible to write a .gz file with settings available on a Deflater). Given 
that, the current patch makes it impossible to reuse them, which is regrettably 
correct.

+1

> GzipCodec should not represent BuiltInZlibInflater as decompressorType
> ----------------------------------------------------------------------
>
>                 Key: HADOOP-6315
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6315
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io
>            Reporter: Aaron Kimball
>            Assignee: Aaron Kimball
>         Attachments: HADOOP-6315.2.patch, HADOOP-6315.3.patch, 
> HADOOP-6315.patch
>
>
> It is possible to pollute CodecPool in such a way that Hadoop cannot read 
> gzip-compressed data.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to