[
https://issues.apache.org/jira/browse/YARN-4308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15260617#comment-15260617
]
Sunil G commented on YARN-4308:
-------------------------------
Yes. debug log is already present, my bad.
bq.Even if right now the only time a negative value comes back is on the first
report, that doesn't mean it won't change later.
I agree your thought. {{CpuTimeTracker}} doesnt have a protocol/standard
defined when to return -1 or 0 or other values. So there are chances that this
can be changed too in future. But I am thinking in covering this proposed INFO
log code from test case point if view also. Because after skipping n times, we
have to log one warning and this cycle has to continue. So this code snippet
also to be covered via a test case. Is it fine if we make a note in
{{CpuTimeTracker}} for its behavior or its expected return code as java doc?. I
am fine in either way, but was thinking about the real usecase for now.
> 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
>
>
> 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)