hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yi Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8081) Split getAdditionalBlock() into two methods.
Date Wed, 08 Apr 2015 05:46:12 GMT

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

Yi Liu commented on HDFS-8081:

Hi Konst, the patch looks good.  Few nits:
// Part I. Analyze the state of the file with respect to the input data.
// Part II.
// Allocate a new block, add it to the INode and the BlocksMap. 
Since in the patch we have two methods, could we remove the original comments since the new
methods comment already cover them.

if (targets == null && onRetryBlock[0] != null) {
For current code logic, if {{targest}} is null, then {{onRetryBlock\[0\] != null}}  should
be true  (Since {{chooseTarget4NewBlock}} will never return null). 
Could you remove {{onRetryBlock\[0\] != null}}  or just assert it? Otherwise it has some misunderstanding:
even {{targets == null}}, if {{onRetryBlock\[0\]}} is null, then we still call {{storeAllocatedBlock}}.

> Split getAdditionalBlock() into two methods.
> --------------------------------------------
>                 Key: HDFS-8081
>                 URL: https://issues.apache.org/jira/browse/HDFS-8081
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.7.0
>            Reporter: Konstantin Shvachko
>            Assignee: Konstantin Shvachko
>         Attachments: HDFS-8081-01.patch
> A minor refactoring to introduce two methods one corresponding to Part I and another
to Part II to make {{getAdditionalBlock()}} more readable.

This message was sent by Atlassian JIRA

View raw message