You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Konstantin Shvachko (JIRA)" <ji...@apache.org> on 2015/04/07 00:20:12 UTC

[jira] [Updated] (HDFS-8071) Redundant checkFileProgress() in PART II of getAdditionalBlock()

     [ https://issues.apache.org/jira/browse/HDFS-8071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konstantin Shvachko updated HDFS-8071:
--------------------------------------
    Attachment: HDFS-8071-01.patch

This is minor optimization. I removed {{checkFileProgress()}} from {{analyzeFileState()}} and call it once in Part 1.
I also added {{checkFileProgress()}} to {{TestAddBlockRetry()}} to make sure the condition holds after Part I and before Part II.

> Redundant checkFileProgress() in PART II of getAdditionalBlock()
> ----------------------------------------------------------------
>
>                 Key: HDFS-8071
>                 URL: https://issues.apache.org/jira/browse/HDFS-8071
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 2.0.3-alpha
>            Reporter: Konstantin Shvachko
>         Attachments: HDFS-8071-01.patch
>
>
> {{FSN.getAdditionalBlock()}} consists of two parts I and II. Each part calls {{analyzeFileState()}}, which among other things check replication of the penultimate block via {{checkFileProgress()}}. See details in HDFS-4452.
> Checking file progress in Part II is not necessary, because Part I already assured the penultimate block is complete. It cannot change to incomplete, unless the file is truncated, which is not allowed for files under construction.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)