[
https://issues.apache.org/jira/browse/YARN-3304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14379908#comment-14379908
]
Karthik Kambatla commented on YARN-3304:
----------------------------------------
My bad. I didn't realize one has to call updateProcessTree before calling
getUsage. While I don't like the fact that one needs to call at least two
methods to get a value in this API, I understand changing this might be a lot
more involved. Given that updateProcessTree takes care of fetching the values
and getUsage or isAvailable calls only access this pre-fetched value, I am okay
with a boolean method or returning -1 with a marginal preference for the
latter.
> 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: Karthik Kambatla
> Priority: Blocker
> Attachments: YARN-3304-v2.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)