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

Steve Loughran commented on HDFS-190:
-------------------------------------

...it was deliberately put into hadoop-common for this reason

> DataNode should be marked as final to prevent subclassing
> ---------------------------------------------------------
>
>                 Key: HDFS-190
>                 URL: https://issues.apache.org/jira/browse/HDFS-190
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Steve Loughran
>            Priority: Minor
>
> Reviewing the DataNode core, it starts a thread in its constructor calling 
> back in to the Run() method. This is generally perceived as very dangerous, 
> as if DataNode were ever subclassed, the subclass would start to be invoked 
> in the run() method before its own constructor had finished working.
> 1. Consider splitting the constructor from the start() operation.
> 2. If this cannot be changed, mark DataNode as final so nobody can subclass 
> it.  Though if the latter were done, it would be convenient to have a method 
> to let external management components poll for the health of the node, and to 
> pick up reasons for the node shutting down.



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

Reply via email to