hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-652) Replace BlockInfo.isUnderConstruction() with isComplete()
Date Thu, 24 Sep 2009 23:58:16 GMT

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

Tsz Wo (Nicholas), SZE commented on HDFS-652:
---------------------------------------------

Two minor comments on TestBlockUnderConstruction:

- "Block is not under construction: " probably should be "Block is not complete: "
{code}
+      assertTrue("Block is not under construction: " + curBlock,
+          curBlock.isComplete());
{code}

- It is better to use assertEquals(..) in the following.
{code}
     assertTrue("Block " + curBlock +
         " isUnderConstruction = " + inode.isUnderConstruction() +
         " expected to be " + isFileOpen,
-        curBlock.isUnderConstruction() == isFileOpen);
+        !curBlock.isComplete() == isFileOpen);
{code}

> Replace BlockInfo.isUnderConstruction() with isComplete() 
> ----------------------------------------------------------
>
>                 Key: HDFS-652
>                 URL: https://issues.apache.org/jira/browse/HDFS-652
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node
>    Affects Versions: Append Branch
>            Reporter: Konstantin Shvachko
>            Assignee: Konstantin Shvachko
>             Fix For: Append Branch
>
>         Attachments: isComplete.patch
>
>
> In current implementation  {{BlockInfo.isUnderConstruction()}} means the block is not
COMPLETE. But there is also a block state UNDER_CONSTRUCTION, which make the semantics of
{{isUnderConstruction()}} rather confusing.

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


Mime
View raw message