hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9133) ExternalBlockReader and ReplicaAccessor need to return -1 on read when at EOF
Date Fri, 25 Sep 2015 21:46:04 GMT

    [ https://issues.apache.org/jira/browse/HDFS-9133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14908720#comment-14908720
] 

Colin Patrick McCabe commented on HDFS-9133:
--------------------------------------------

bq. Thanks Colin for the work. The patch itself looks good, +1.

Thanks

bq. For other block readers, the length means the number of bytes to read, but in ExternalBlockReader,
it means "visible length" which assumes it's the block replica length? Since from the calculation
of skip and available in ExternalBlockReader , it indicates it assumes it's the block replica
length.

You are correct... we should not be treating this as the {{visibleLength}} of the block, since
it's really the number of bytes in between the end of the block and the current offset within
the block.  Let me file another jira to fix this.

> ExternalBlockReader and ReplicaAccessor need to return -1 on read when at EOF
> -----------------------------------------------------------------------------
>
>                 Key: HDFS-9133
>                 URL: https://issues.apache.org/jira/browse/HDFS-9133
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>    Affects Versions: 2.8.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HDFS-9133.001.patch
>
>
> ExternalBlockReader and ReplicaAccessor need to return -1 on read when at EOF, as per
the JavaDoc in BlockReader.java.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message