hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-190) DataNode should be marked as final to prevent subclassing
Date Tue, 10 Nov 2015 20:28:11 GMT

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

Chris Nauroth commented on HDFS-190:
------------------------------------

Yes, the YARN-style service model is a good idea.

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

Mime
View raw message