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

Konstantin Shvachko commented on HDFS-698:
------------------------------------------

Member {{BlockSender.replica}} may be converted to a local variable in 
{{BlockSender}} constructor because it is not used anywhere else.

> BlockSender should compare on disk file length with replica length instead of 
> replica visible length.
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-698
>                 URL: https://issues.apache.org/jira/browse/HDFS-698
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: data-node
>    Affects Versions: 0.21.0
>            Reporter: Konstantin Shvachko
>             Fix For: 0.21.0
>
>
> BlockSender waits until all bytes of a replica are flushed to disk. Currently 
> it compares the replica bytes on disk with the replica visible length. In 
> order to make sure that *all* bytes are flushed it should compare the bytes 
> on disk with the block length, because visible length may be smaller than the 
> block length.
> It would be useful also to create a special method 
> FSDataset.getBytesOnDisk(blockID), which gets this information through the 
> volume map. Otherwise we may access replicas, which are not in the map 
> anymore.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to