hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jing Zhao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7829) Code clean up for LocatedBlock
Date Mon, 16 Mar 2015 23:01:38 GMT

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

Jing Zhao commented on HDFS-7829:
---------------------------------

Sorry for the late response, [~tasanuma0829].

For {{LocatedBlock(ExtendedBlock, DatanodeInfo[], long, boolean)}}, since all the places you
mentioned are tests, we can still replace them with {{LocatedBlock(ExtendedBlock, DatanodeInfo[]}}.
You can use setter methods to set offset and corrupt if necessary.

For {{LocatedBlock(ExtendedBlock b, DatanodeInfo[], String[], StorageType[])}}, I guess all
the other information used by {{DatanodeStorageInfo}}'s construction will not be used by LocatedBlock.
But I'm also fine if you decide to keep this constructor. I think we may want to keep {{LocatedBlock(ExtendedBlock,
DatanodeStorageInfo[], long, boolean)}} since {{DatanodeStorageInfo}} should be the type used
by the API after all the heterogeneous storage work.

> Code clean up for LocatedBlock
> ------------------------------
>
>                 Key: HDFS-7829
>                 URL: https://issues.apache.org/jira/browse/HDFS-7829
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Jing Zhao
>            Assignee: Takanobu Asanuma
>            Priority: Minor
>         Attachments: HDFS-7829.1.patch, HDFS-7829.2.patch, HDFS-7829.3.patch
>
>
> We can do some code cleanup for {{LocatedBlock}}, including:
> # Using a simple Builder pattern to avoid multiple constructors
> # Setting data fields like {{corrupt}} and {{offset}} to final



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

Mime
View raw message