[ https://issues.apache.org/jira/browse/YARN-3304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14383616#comment-14383616 ]
Anubhav Dhoot commented on YARN-3304: ------------------------------------- Overall the API looks usable and will fix the issues But the implementation has to do a lot of duplication of code to implement the boolean api. The CPU isAvailable is straightforward but the memory calculations seem to rely on duplicating code that does the actual calculation. Wouldn't using it as -1 be easier instead of duplicating code to keep it as 0? > 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-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)