HADOOP-5281 carried over the semantics from the existing code, i.e. returned BuiltInZlibInflater when the native libs aren't loaded:
- return ZlibFactory.getZlibDecompressorType(conf);
+ return ZlibFactory.isNativeZlibLoaded(conf)
+ ? GzipZlibDecompressor.class
+ : BuiltInZlibInflater.class;
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 (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.