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

Naganarasimha G R commented on YARN-2729:
-----------------------------------------

Thanks for the comments [~rohithsharma],
bq. 1.NodeLabelsProvider is abstract class. Why it was not made as Interface?
Good point i think making it as interface  should be sufficient and in 
NodeManager we can do {{addIfService(nodeLabelsProvider)}}, this will will give 
the implementations of the NodeLabelsProvider to be much more flexible. will 
update current patch to incorporate these modifications shortly
bq. 2. And for each NodeLabelsProvide implementing any other way in future 
which require modification in NodeManager to create an instance of 
NodeLabelsProvider. Instead of that loading implemented class would be easier 
and also it is pluggable.
I presume you might of got it wrong over configuration of NodeLabelsProvider in 
NM. Basically there is whitelist of script and config and if this doesnt match 
then we are assuming its a qualified classname and try load it as you 
mentioned. Hence still its pluggable. correct me if i am wrong in understanding 
your comment here
bq. From the below description, I assume that NodeLabelsProvider instance can 
be created only if configuration-type is distributed. And I think before 
creating an instance for provider, there should be check for configuration-type 
also.
This was a conscious decision which was taken to minimize the number of 
configurations on the NM side. It was sufficient to configure provider only as 
in NM, if configuration-type is configured and provider is not configured then 
we need to throw exception. {{configuration-type}} is mainly for the RM to deal 
with NM's HB/registrations and blocking CLI and REST interactions.


> Support script based NodeLabelsProvider Interface in Distributed Node Label 
> Configuration Setup
> -----------------------------------------------------------------------------------------------
>
>                 Key: YARN-2729
>                 URL: https://issues.apache.org/jira/browse/YARN-2729
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager
>            Reporter: Naganarasimha G R
>            Assignee: Naganarasimha G R
>         Attachments: YARN-2729.20141023-1.patch, YARN-2729.20141024-1.patch, 
> YARN-2729.20141031-1.patch, YARN-2729.20141120-1.patch, 
> YARN-2729.20141210-1.patch, YARN-2729.20150309-1.patch, 
> YARN-2729.20150322-1.patch, YARN-2729.20150401-1.patch, 
> YARN-2729.20150402-1.patch, YARN-2729.20150404-1.patch, 
> YARN-2729.20150517-1.patch, YARN-2729.20150830-1.patch, 
> YARN-2729.20150925-1.patch, YARN-2729.20151310-1.patch, 
> YARN-2729.20151310-2.patch
>
>
> Support script based NodeLabelsProvider Interface in Distributed Node Label 
> Configuration Setup . 



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

Reply via email to