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 14:56:15 GMT

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

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

A couple of comments (perhaps because of my ignorance):
- in DataXceiver: is datanode.getXceiverCount() is so costly that  it really make sense performance
wise?
{noformat}
-      LOG.debug(datanode.dnRegistration + ":Number of active connections is: "
-                               + datanode.getXceiverCount());
+      if (LOG.isDebugEnabled()) {
+        LOG.debug(datanode.dnRegistration + ":Number of active connections is: "
+            + datanode.getXceiverCount());
+      }
{noformat}

- it seems that the switch statement won't grow up anytime soon, but wouldn't it be better
looking and perhaps more efficient to replace it with polymorphism? It will increase a number
of classes though, but the control flow would be better enclosed within new classes. I.e.
the operations like opReadBlock(), opBlockChecksum(), etc. could be moved to a smaller classes
like OpBlockRead, OpBlockCheckSum which will expose only one public method, say, doOperation().

> 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