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

Junping Du commented on YARN-3304:
----------------------------------

Thanks [~vinodkv] for comments! 
Agree that the second comment is very important, and we should put it on public 
interface now.
For boolean API VS. negative value, sounds like more people may prefer the 
later one so far. I would like to hear your more comments when you see the 
finally code looks like.
In v4 patch, I will post 2 patches, one for boolean API (with addressing 2nd 
comment above based on v3 patch) way, and the other is for negative value way. 
Honestly speaking, I don't feel very comfortable in writing patch for the later 
way as every return -1 sounds like a warning to external developer that to 
follow the implicit contract here... 
Also, please note that the negative value way is not a completed work which 
need YARN-3392 ([~adhoot] have a demo patch there) and fix in MapReduce 
resource counter.

> 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
(v6.3.4#6332)

Reply via email to