[
https://issues.apache.org/jira/browse/HADOOP-12060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14631707#comment-14631707
]
Jing Zhao commented on HADOOP-12060:
------------------------------------
Thanks for updating the patch, Kai! The v2 patch looks good to me. +1
Maybe one improvement can be to include the two {{ensureLengthAndType}} calls
inside of the {{checkParameters}} method. In this way we can avoid scanning the
inputs/outputs multiple times. We can let {{checkParameter}} return a new
{{BufferState}} class to indicate the {{usingDirectBuffer}} and {{dataLen}}
information. This improvement can be optional. You can also defer this to
another jira.
> Address some issues related to ByteBuffer type input/output buffers for raw
> erasure coders
> ------------------------------------------------------------------------------------------
>
> Key: HADOOP-12060
> URL: https://issues.apache.org/jira/browse/HADOOP-12060
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: io
> Reporter: Kai Zheng
> Assignee: Kai Zheng
> Attachments: HADOOP-12060-HDFS-7285-v1.patch,
> HADOOP-12060-HDFS-7285-v2.patch
>
>
> In HDFS-8319 [~jingzhao] raised some issues about ByteBuffer type
> input/output buffers for raw erasure coders:
> * Should support ByteBuffers originated from {{ByteBuffer#slice}} calls;
> * Should clearly spec in Javadoc that no mixing of on-heap buffers and direct
> buffers are allowed, and with necessary checking codes ensuring the same type
> of buffers are used.
> In HDFS-8319 patch by [~jingzhao] there are some good refactoring codes that
> would be incorporated here.
> As discussed open this to address the issues separately.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)