[ https://issues.apache.org/jira/browse/YARN-3304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14376920#comment-14376920 ]
Junping Du commented on YARN-3304: ---------------------------------- Thanks [~adhoot] for comments! bq. If we use a default of zero we cannot distinguish when its unavailable versus zero usage. That will make the future "track the improvement to handle unavailable case later" near impossible to do. May be we don't have to leverage "-1" in resource usage to distinguish unavailable case? e.g. we can have some boolean value to identify the resource is available or not which sounds more correct than using odd value like [~ka...@cloudera.com] mentioned before. bq. I propose we make all the defaults consistently -1. That's an incompatible change which sounds not necessary for now. bq. I can fix the metrics as well to use this to implement tracking unavailable case. Opened YARN-3392 for that. Agree that we should have some fix on metrics side later. But even that, with changed all default values to -1, it is still a incompatible behavior with old released version. So I propose to go patch here (after fixing a minor test failure) in 2.7 given this is a blocker and we can fix YARN-3392 later in 2.8. Thoughts? > 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.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)