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

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

As I said earlier, the calling code checks how many bytes are left in the 
block.  So unless I'm missing something, doing this computation just creates 
extra work, but has no benefit.  Another concern is that you only changed the 
deprecated {{RemoteBlockReader}} class, and not the {{RemoteBlockReader2}} 
class which almost everyone has transitioned to.

How about we should just add a comment on {{available}} that it may return more 
than is actually present in the block?  That will make it easier to read the 
code.

> RemoteBlockReader#available() should call FSInputChecker.available()
> --------------------------------------------------------------------
>
>                 Key: HDFS-6369
>                 URL: https://issues.apache.org/jira/browse/HDFS-6369
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>            Priority: Trivial
>         Attachments: HDFS-6369.patch
>
>
> Currently DFSClient.TCP_WINDOW_SIZE is directly returned.
> However, FSInputChecker.available(), in the superclass, may return value 
> lower than the constant.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to