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

Colin Patrick McCabe commented on HADOOP-10047:
-----------------------------------------------

This looks very good in general.  The code is a lot smaller and clearer now 
that you're using a separate interface.

I'm not sure if {{ZlibDecompressorShim}} is really necessary.  If 
{{inflateDirect}} was a package-private method of {{ZlibDecompressor}} rather 
than a private method, {{ZlibDirectDecompressor}} could call it directly.  Is 
it really such a big risk to expose this function to other code inside the 
{{org.apache.hadoop.io.compress.zlib}} package?  This package just doesn't have 
that much code in it, and all of it pertains to, well, zlib.

Aside from that, looks good.  It would be nice to see a unit test, even a 
minimal one, to prevent regressions in this area.

> Add a directbuffer Decompressor API to hadoop
> ---------------------------------------------
>
>                 Key: HADOOP-10047
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10047
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: io
>            Reporter: Gopal V
>            Assignee: Gopal V
>              Labels: compression
>         Attachments: DirectCompressor.html, DirectDecompressor.html, 
> HADOOP-10047-redo-WIP.patch, HADOOP-10047-WIP.patch, 
> HADOOP-10047-with-tests.patch
>
>
> With the Zero-Copy reads in HDFS (HDFS-5260), it becomes important to perform 
> all I/O operations without copying data into byte[] buffers or other buffers 
> which wrap over them.
> This is a proposal for adding a DirectDecompressor interface to the 
> io.compress, to indicate codecs which want to surface the direct buffer layer 
> upwards.
> The implementation should work with direct heap/mmap buffers and cannot 
> assume .array() availability.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to