[
https://issues.apache.org/jira/browse/HDFS-14585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874822#comment-16874822
]
Lisheng Sun commented on HDFS-14585:
------------------------------------
Thank [~stack] for your comments. I have updated the patch for branch-2.9.v2.
{quote}Some nice cleanup and duplication removal; e.g. using BB to keep account
on the read buffer (offsets and length), purge of the HDFS-8703 unused EC
version of actualGetFromOneDataNode, pulling out long targetEnd = targetStart +
bytesToRead - 1, etc.
{quote}
Sorry, I don't quite understand thse meaning of this comments.
{quote}Is this going to be ok: 1249 tmp.limit(tmp.position() + len); ? The EC
version of actualGetFromOneDataNode had a checkReadPortions. Should there be a
check we don't go over the end of the buffer here?
{quote}
I add whether the read data length is the same as the expected data length.
{code:java}
if (nread != len) {
throw new IOException("truncated return from reader.read(): "
+ "excpected " + len + ", got " + nread);
}
{code}
Thank you again for review this patch. Could you have time to review it?
> Backport HDFS-8901 Use ByteBuffer in DFSInputStream#read to branch2.9
> ---------------------------------------------------------------------
>
> Key: HDFS-14585
> URL: https://issues.apache.org/jira/browse/HDFS-14585
> Project: Hadoop HDFS
> Issue Type: Task
> Reporter: Lisheng Sun
> Assignee: Lisheng Sun
> Priority: Major
> Attachments: HDFS-14585.branch-2.9.v1.patch,
> HDFS-14585.branch-2.9.v2.patch, HDFS-14585.branch-2.v1.patch
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]