Devaraj K commented on YARN-3513:

Thanks [~Naganarasimha] for the patch. 

+            if (LOG.isDebugEnabled()) {
+              // Accounting the total memory in usage for all containers
+              vmemUsageByAllContainers += currentVmemUsage;
+              pmemByAllContainers += currentPmemUsage;
+              // Accounting the total cpu usage for all containers
+              cpuUsagePercentPerCoreByAllContainers += cpuUsagePercentPerCore;
+              cpuUsageTotalCoresByAllContainers += cpuUsagePercentPerCore;
+            }

Here resource usage calculations happen only when the debug log is enabled, 
users can change the log level any time using the below command.

[devaraj@server2 bin]$ ./yarn daemonlog

Usage: General options are:
        [-getlevel <host:httpPort> <classname>]
        [-setlevel <host:httpPort> <classname> <level>]

These values may go wrong when the user changes the log level while Node 
Manager running.

> Remove unused variables in ContainersMonitorImpl and add debug log for 
> overall resource usage by all containers 
> ----------------------------------------------------------------------------------------------------------------
>                 Key: YARN-3513
>                 URL: https://issues.apache.org/jira/browse/YARN-3513
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: nodemanager
>            Reporter: Naganarasimha G R
>            Assignee: Naganarasimha G R
>            Priority: Trivial
>              Labels: BB2015-05-TBR, newbie
>         Attachments: YARN-3513.20150421-1.patch, YARN-3513.20150503-1.patch, 
> YARN-3513.20150506-1.patch, YARN-3513.20150507-1.patch, 
> YARN-3513.20150508-1.patch, YARN-3513.20150508-1.patch
> Some local variables in MonitoringThread.run()  : {{vmemStillInUsage and 
> pmemStillInUsage}} are not used and just updated. 
> Instead we need to add debug log for overall resource usage by all containers

This message was sent by Atlassian JIRA

Reply via email to