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

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

Looks good.  I assume the patch apply failure is something trivial you'll fix 
soon.

Thanks for writing some unit tests, too.  I see that we're already catching 
some bugs in the exception handling of the current code :)

In {{DirectDecompressor#decompress}}, it's interesting that there is both a src 
and dst buffer.  In the equivalent non-direct-buffer 
{{Decompressor#decompress}} function, there is only an output array.  Is it 
possible to use different 'src' buffers for each call you make to 
{{DirectDecompressor#decompress}}?  If so, it might be worth documenting this.  
If not, I wonder if the src buffer could be supplied to the 
{{DirectDecompressionCodec#createDirectDecompressor}} function so that only a 
dst buffer needed to be supplied to {{decompress}}?

> 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
>    Affects Versions: 2.3.0
>            Reporter: Gopal V
>            Assignee: Gopal V
>              Labels: compression
>             Fix For: 2.3.0
>
>         Attachments: DirectCompressor.html, DirectDecompressor.html, 
> HADOOP-10047-WIP.patch, HADOOP-10047-final.patch, 
> HADOOP-10047-redo-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