[
https://issues.apache.org/jira/browse/HDFS-4208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501714#comment-13501714
]
Uma Maheswara Rao G commented on HDFS-4208:
-------------------------------------------
Thanks a lot for the explanation Brandon. Good catch!
Latest revision looks great to me as well.
Some minor comments adding to Suresh points above, please take care of them in
next revision.
- I think we can make getSafeBlockCount as private, as we are not using it
anywhere as of now
- typo: numExculdedBlocks --> numExcludedBlocks
- I am also having a suspect that, When there are no blocks added yet(just
create a file), lease path will be there but blocks will be just 0. So, we are
having only null check here, do you think we should have length check as well
to avoid AIOBE? I did not check this in detail, please have a test and verify
once. [ create a file and don't add any blocks, let's be emtry blocks list then
restart NN ]
- BTW, please add licence header to test file as you are touching that file
anyway.
Regards,
Uma
> NameNode could be stuck in SafeMode due to never-created blocks in branch-1
> ---------------------------------------------------------------------------
>
> Key: HDFS-4208
> URL: https://issues.apache.org/jira/browse/HDFS-4208
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 1.2.0
> Reporter: Brandon Li
> Assignee: Brandon Li
> Attachments: HDFS-4208.branch-1.patch, HDFS-4208.branch-1.patch
>
>
> In one test case, NameNode allocated a block and then was killed before the
> client got the addBlock response. After NameNode restarted, it couldn't get
> out of SafeMode waiting for the block which was never created. In trunk,
> NameNode can get out of SafeMode since it only counts complete blocks.
> However branch-1 doesn't have the clear notion of under-constructioned-block
> in Namenode.
> JIRA HDFS-4212 is to track the never-created-block issue and this JIRA is to
> fix NameNode in branch-1 so it can get out of SafeMode when
> never-created-block exists.
> The proposed idea is for SafeMode not to count the zero-sized last block in
> an under-construction file as part of total blcok count.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira