[
https://issues.apache.org/jira/browse/HADOOP-11920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14531892#comment-14531892
]
Yi Liu commented on HADOOP-11920:
---------------------------------
Yes, the caller can pass a direct buffer, but also can use a java heap byte
buffer. Why it should be DirectByteBuffer?
In RawErasureEncoder, the encode declares it accepts {{ByteBuffer}}
{code}
public void encode(ByteBuffer[] inputs, ByteBuffer[] outputs);
{code}
If we want to accept only Direct ByteBuffer in {{XORRawEncoder#doEncode}}, we
should check it must be a direct buffer.
> Refactor some codes for erasure coders
> --------------------------------------
>
> Key: HADOOP-11920
> URL: https://issues.apache.org/jira/browse/HADOOP-11920
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: io
> Reporter: Kai Zheng
> Assignee: Kai Zheng
> Attachments: HADOOP-11920-HDFS-7285-02.patch,
> HADOOP-11920-HDFS-7285-v4.patch, HADOOP-11920-v1.patch,
> HADOOP-11920-v2.patch, HADOOP-11920-v3.patch
>
>
> While working on native erasure coders and also HADOOP-11847, it was found in
> some chances better to refine a little bit of codes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)