hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin J. Price (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-6297) Hadoop's support for zlib library lacks support to perform flushes (Z_SYNC_FLUSH and Z_FULL_FLUSH)
Date Wed, 07 Oct 2009 18:19:31 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-6297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Kevin J. Price updated HADOOP-6297:

    Affects Version/s:     (was: 0.21.0)
               Status: Patch Available  (was: Open)

Exposes the ability to pass a flush level through to the zlib deflate function call.  This
is achieved by:

* Creating a FlushLevel enumeration that mirrors the zlib values.
* Adding a 'flushLevel' parameter to the compress function that takes a value in this enumeration,
and sets a local private variable to the integer corresponding to this enumeration. (If the
finish boolean is true, then FINISH is used in place of the flushLevel parameter, which matches
current behavior.
* Create a new compress function that matches the old signature that just calls the new compress
with NO_FLUSH for the flush level, which should maintain existing behavior.
* Make the native code wrapper check for the private flushLevel variable and pass that along
to the underlying deflate call.

Also added a TestZlib unit test that tests the three possible flush levels. 

> Hadoop's support for zlib library lacks support to perform flushes (Z_SYNC_FLUSH and
> --------------------------------------------------------------------------------------------------
>                 Key: HADOOP-6297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6297
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: io
>    Affects Versions: site
>            Reporter: Kevin J. Price
>            Priority: Minor
> The zlib library supports the ability to perform two types of flushes when deflating
data. It can perform both a Z_SYNC_FLUSH, which forces all input to be written as output and
byte-aligned and resets the Huffman coding, and it also supports a Z_FULL_FLUSH, which does
the same thing but additionally resets the compression dictionary.  The Hadoop wrapper for
the zlib library does not support either of these two methods.
> Adding support should be fairly trivial.  An additional deflate method that takes a fourth
"flush" parameter, and a modification to the native c code to accept this fourth parameter
and pass it along to the zlib library.  I can submit a patch for this if desired.
> It should be noted that the native SUN Java API is likewise missing this functionality,
as has been noted for over a decade here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4206909

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

View raw message