hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takanobu Asanuma (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-7829) Code clean up for LocatedBlock
Date Tue, 17 Mar 2015 05:32:38 GMT

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

Takanobu Asanuma updated HDFS-7829:
    Attachment: HDFS-7829.4.patch

Thank you for your review, Jing. I thought and changed my patch:

1. I removed some constructors:{{LocatedBlock(ExtendedBlock, DatanodeInfo[], long, boolean)}},{{LocatedBlock(ExtendedBlock,
DatanodeStorageInfo[])}} and changed callers.
And I kept {{LocatedBlock(ExtendedBlock b, DatanodeInfo[], String[], StorageType[])}}.

2. Since {{setStartOffset}} and {{setCorrupt}} are used by tests out of the package, I set
public to them.

3. I set final to {{storageIDs}} and {{storageTypes}}.

How does that look?

> 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, HDFS-7829.4.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

View raw message