[
https://issues.apache.org/jira/browse/HADOOP-3933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621538#action_12621538
]
Ning Li commented on HADOOP-3933:
---------------------------------
BlockSender's constructor contains the following:
offset = (startOffset - (startOffset % bytesPerChecksum));
if (length >= 0) {
// Make sure endOffset points to end of a checksumed chunk.
long tmpLen = startOffset + length + (startOffset - offset);
if (tmpLen % bytesPerChecksum != 0) {
tmpLen += (bytesPerChecksum - tmpLen % bytesPerChecksum);
}
if (tmpLen < endOffset) {
endOffset = tmpLen;
}
}
The line "long tmpLen = startOffset + length + (startOffset - offset);"
makes BlockSender send more data than necessary. It should be
replaced by "long tmpLen = startOffset + length;".
All unit tests pass. No additional test is needed. Do I need to submit
a separate patch file? It's a one-line fix.
> DataNode's BlockSender sends more data than necessary
> -----------------------------------------------------
>
> Key: HADOOP-3933
> URL: https://issues.apache.org/jira/browse/HADOOP-3933
> Project: Hadoop Core
> Issue Type: Bug
> Components: dfs
> Reporter: Ning Li
> Priority: Minor
>
> DataNode's BlockSender sends more data than necessary because of how it
> computes endOffset.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.