You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Chris Nauroth (JIRA)" <ji...@apache.org> on 2015/11/10 21:07:11 UTC

[jira] [Resolved] (HDFS-190) DataNode should be marked as final to prevent subclassing

     [ https://issues.apache.org/jira/browse/HDFS-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Nauroth resolved HDFS-190.
--------------------------------
    Resolution: Won't Fix

We're now in a situation where the current codebase uses subclassing of {{DataNode}} for some tests.  There has been no activity on this issue for many years, so it looks unlikely that it would be implemented.  I'm closing it as won't fix.

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