hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Boudnik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-524) Further DataTransferProtocol code refactoring.
Date Tue, 04 Aug 2009 21:48:14 GMT

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

Konstantin Boudnik commented on HDFS-524:
-----------------------------------------

As I've suspected it was my ignorance talking - not me :-)

After some more careful reading of the code, it turned out to me that 
- while {{Op}} might be a good candidate to become a factory which will be handling instantiation
of all these new operation specific classes
- {{DataXceiver}} might not need to extend {{DataTransferProtocol.Receiver}} as soon as all
operations are pulled out into a separate classes
it won't solve all the problems.

The biggest one, in my opinion, is that {{DataTransferProtocol.Receiver}} has two inner classes
{{Sender}} and {{Receiver}} which have their own sets of unique operations to read, write,
and copy blocks. Although, it might be possible to generalize those with some combination
of polymorphism and delegation, it won't improve the current situation and will, perhaps,
degrade the existing design.

I guess I'm ready to withdraw my initial comment - thanks for crashing it :-) !

> Further DataTransferProtocol code refactoring.
> ----------------------------------------------
>
>                 Key: HDFS-524
>                 URL: https://issues.apache.org/jira/browse/HDFS-524
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: 0.21.0
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>             Fix For: 0.21.0
>
>         Attachments: h524_20090803.patch
>
>
> This is a further refactoring over HDFS-377 to move generic codes from DataXceiver to
DataTransferProtocol.

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