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

Colin Patrick McCabe commented on HDFS-4953:
--------------------------------------------

bq. To remove the SUN package dependency: how about reusing the native buffer 
for a different file when its ref-count is zero, rather than allocating and 
deallocating each time?

You cannot reuse an mmap for one file on a different file.

bq. I didn't find the definition of struct hadoopZeroCopyCursor. Is any header 
file missed in the patch?

We typecast {{struct hadoopZeroCopyCursor}} to a {{jobject}} whenever it is 
used.  Since we don't dereference the type, there is no need for a type 
definition.  Having the type is useful because it prevents callers from passing 
arbitrary pointers to {{hadoopZeroCopyRead}} and other functions.

I don't have a strong feeling about it either way, but I would prefer to get 
this into trunk, since I don't think there are any dependencies on HDFS-4949.  
Since there are other outstanding JIRAs on {[BlockReaderLocal}}, it would be 
nice to avoid conflicts.
                
> enable HDFS local reads via mmap
> --------------------------------
>
>                 Key: HDFS-4953
>                 URL: https://issues.apache.org/jira/browse/HDFS-4953
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>    Affects Versions: 2.3.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: benchmark.png, HDFS-4953.001.patch, HDFS-4953.002.patch, 
> HDFS-4953.003.patch, HDFS-4953.004.patch, HDFS-4953.005.patch, 
> HDFS-4953.006.patch
>
>
> Currently, the short-circuit local read pathway allows HDFS clients to access 
> files directly without going through the DataNode.  However, all of these 
> reads involve a copy at the operating system level, since they rely on the 
> read() / pread() / etc family of kernel interfaces.
> We would like to enable HDFS to read local files via mmap.  This would enable 
> truly zero-copy reads.
> In the initial implementation, zero-copy reads will only be performed when 
> checksums were disabled.  Later, we can use the DataNode's cache awareness to 
> only perform zero-copy reads when we know that checksum has already been 
> verified.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to