[
https://issues.apache.org/jira/browse/HDFS-3479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287703#comment-13287703
]
Todd Lipcon commented on HDFS-3479:
-----------------------------------
{code}
+ int numRead = in.read(buf, 0, (int)amt);
+ if (numRead < amt) {
{code}
{{read}} isn't guaranteed to return all bytes requested, even if there are more
bytes in the file. So I don't think this check is necessary -- instead just
check numRead >= 0, I think.
Otherwise looks good to me.
> backport HDFS-3335 (check for edit log corruption at the end of the log) to
> branch-1
> ------------------------------------------------------------------------------------
>
> Key: HDFS-3479
> URL: https://issues.apache.org/jira/browse/HDFS-3479
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 1.0.0
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HDFS-3335-b1.005.patch, HDFS-3479-b1.002.patch
>
>
> backport HDFS-3335 (check for edit log corruption at the end of the log) to
> branch-1
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira