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

Steve Loughran commented on HDFS-7007:
--------------------------------------

The current NN code isn't suitable for subclassing, and the fact that 
BackupNode does exactly that is a bit dangerous.

Specifically, the NN ctor calls {{initialize()}} which appears designed to be 
overrridden ... but subclasses won't be fully constructed until this happens.

The DNs are worse -they start threads in their ctors, which are one of the big 
forbidden actions of Java.

I'd propose making the NN and DN YARN services first, so we have a nice 
consistent override model. As with the RM, we can make them subclasses of 
CompositeService, so making it easy to add children. 

This does not have to be done in the consensus node branch ... it can be done 
in trunk.

> Interfaces to plugin ConsensusNode.
> -----------------------------------
>
>                 Key: HDFS-7007
>                 URL: https://issues.apache.org/jira/browse/HDFS-7007
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: 3.0.0
>            Reporter: Konstantin Shvachko
>
> This is to introduce interfaces in NameNode and namesystem, which are needed 
> to plugin ConsensusNode.



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

Reply via email to