[
https://issues.apache.org/jira/browse/YARN-4308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sunil G updated YARN-4308:
--------------------------
Attachment: 0010-YARN-4308.patch
Thanks [~templedf]. I have added messages for assert conditions. There were
couple of methods in {{MockCPUResourceCalculatorProcessTree}} which were not
needed for this test. I have removed them too as part of this new patch.
[~Naganarasimha Garla], thank you for the thoughts. I had a similar line of
thoughts before choosing this new Mock class for CPU resource util class.
- There were 4 more methods which needed to be overridden along with
{{getCPUPercentage}}. So a separate mock class was looking more cleaner and
readable.
- Currently we made some comments and java doc to point out that -1 has to be
returned only in the first run where data is not enough to produce CPU usage.
Still any new impl's can try to come with cases where -1 may be needed to
return in b/w cycles also. So a separate mock class can help in writing all
these specific test logics as needed. This is just done to make a CPU specific
test class so that any mock work can be done as common.
Its not very much of a strong reason,but it seems good to take it separate.
More thoughts are welcome :)
> ContainersAggregated CPU resource utilization reports negative usage in first
> few heartbeats
> --------------------------------------------------------------------------------------------
>
> Key: YARN-4308
> URL: https://issues.apache.org/jira/browse/YARN-4308
> Project: Hadoop YARN
> Issue Type: Bug
> Components: nodemanager
> Affects Versions: 2.7.1
> Reporter: Sunil G
> Assignee: Sunil G
> Attachments: 0001-YARN-4308.patch, 0002-YARN-4308.patch,
> 0003-YARN-4308.patch, 0004-YARN-4308.patch, 0005-YARN-4308.patch,
> 0006-YARN-4308.patch, 0007-YARN-4308.patch, 0008-YARN-4308.patch,
> 0009-YARN-4308.patch, 0010-YARN-4308.patch
>
>
> NodeManager reports ContainerAggregated CPU resource utilization as -ve value
> in first few heartbeats cycles. I added a new debug print and received below
> values from heartbeats.
> {noformat}
> INFO
> org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl:
> ContainersResource Utilization : CpuTrackerUsagePercent : -1.0
> INFO
> org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl:ContainersResource
> Utilization : CpuTrackerUsagePercent : 198.94598
> {noformat}
> Its better we send 0 as CPU usage rather than sending a negative values in
> heartbeats eventhough its happening in only first few heartbeats.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]