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

Chris Douglas commented on HADOOP-12180:
----------------------------------------

bq. I think that the SysInfo name is not as meaningful as ResourceCalculator 
but I don't have better proposals so I guess is fine
Unfortunately, YARN also has a o.a.h.yarn.util.resource.ResourceCalculator 
that's not related to o.a.h.yarn.util.ResourceCalculatorPlugin. I'm open to 
other names, but SysInfo seemed to cover the {{/proc}} scraping this performs.

bq. What about making ResourceCalculatorPlugin extend/implement SysInfo to make 
the dependency more clear? This would also change the initialization of the 
other plugins and may not work.
Agreed, this is awkward. If RCP extends SysInfo, then the impls in YARN can't 
be related to the impls in Common. SysInfo as an interface doesn't really make 
anything cleaner; RCP would need to be an interface, and interfaces can't have 
static methods (i.e., RCP::getResourceCalculatorPlugin). Letting RCP be an 
(extensible) wrapper around SysInfo preserves existing RCP implementations in 
YARN. If we relax the backwards-compat we could do better, but the gains seem 
mostly aesthetic.

I'll add the LimitedPrivate annotation. I'll file a separate JIRA for thread 
safety, so YARN-3819, YARN-3820 can merge and we can consider the whole picture.

> Move ResourceCalculatorPlugin from YARN to Common
> -------------------------------------------------
>
>                 Key: HADOOP-12180
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12180
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: util
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>         Attachments: HADOOP-12180.000.patch, HADOOP-12180.001.patch
>
>
> Some of the monitoring functions could be moved from YARN to Common for 
> easier sharing



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

Reply via email to