[ 
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.2.patch

I submitted a patch again. 

I found that RecoveringBlock inherited LocatedBlock. So I also implemented 
Builder pattern in RecoveringBlock and fixed codes in LocatedBlock to use 
generics. I referred to 
[http://stackoverflow.com/questions/17164375/subclassing-a-java-builder-class]. 
This may be little complicated. And I fixed all codes calling constructors of 
these classes.

Please would you review my patch again. If it is no problem, I will remove 
multiple constructors in LocatedBlock and RecoveringBlock. Thank you.

> 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
>
>
> 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)

Reply via email to