[
https://issues.apache.org/jira/browse/HDFS-5191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13765498#comment-13765498
]
Colin Patrick McCabe commented on HDFS-5191:
--------------------------------------------
I would propose changing read to have a varargs parameter of type ReadOption:
{code}
public ByteBuffer read(ByteBufferFactory factory, int maxLength, ReadOption...)
{code}
This will let us add options in the future easily. One {{ReadOption}} that we
probably want right away is the ability to use {{mmap}} even on data that is
not cached. This will be useful when reading data that contains its own
checksum-- as many file formats do.
> revisit zero-copy API in FSDataInputStream to make it more intuitive
> --------------------------------------------------------------------
>
> Key: HDFS-5191
> URL: https://issues.apache.org/jira/browse/HDFS-5191
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: hdfs-client, libhdfs
> Affects Versions: HDFS-4949
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
>
> As per the discussion on HDFS-4953, we should revisit the zero-copy API to
> make it more intuitive for new users.
--
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