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

Hairong Kuang commented on HDFS-800:
------------------------------------

commitBlock is a private method and currently is called only by 
commitOrCompleteLastBlock. So I think that no checking is ok.

Also this patch does not have a unit test. HDFS already has a unit test  
TestBlockUnderConstruction#testBlockCreation that verifies the state of each 
block of a file.

> The last block of a file under construction may change to the COMPLETE state 
> in response to getAdditionalBlock or completeFileInternal
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-800
>                 URL: https://issues.apache.org/jira/browse/HDFS-800
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.21.0, 0.22.0
>
>         Attachments: HDFS-800.patch
>
>
> Currently the last block changes to be the COMMITTED state. However, if the 
> block already has a valid finalizeded replica, it should be changed to be the 
> COMPLETE state.

-- 
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