Vinod Kumar Vavilapalli commented on YARN-3304:

I too feel the same w.r.t the code duplication. It is going to be very hard 
maintaining this.

To me, all ideas seem to converge on either throwing an exception or return -1. 
Given there were no external developers using this before and this is the first 
release where we are making this public, I think we should go with the -1 

I also think we should clearly javadoc this class saying this should not be 
used for external users, it is more of an SPI for developers to extend and 
include their own process-tree implementation. (Writing it that way, I don't 
see this to be public at all, but we screwed up way back when we made this a 
user-visible configuration). For doing this, we should make the 
getResourceCalculatorProcessTree() an @Private method.

> ResourceCalculatorProcessTree#getCpuUsagePercent default return value is 
> inconsistent with other getters
> --------------------------------------------------------------------------------------------------------
>                 Key: YARN-3304
>                 URL: https://issues.apache.org/jira/browse/YARN-3304
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>            Reporter: Junping Du
>            Assignee: Junping Du
>            Priority: Blocker
>         Attachments: YARN-3304-v2.patch, YARN-3304-v3.patch, YARN-3304.patch
> Per discussions in YARN-3296, getCpuUsagePercent() will return -1 for 
> unavailable case while other resource metrics are return 0 in the same case 
> which sounds inconsistent.

This message was sent by Atlassian JIRA

Reply via email to