zhihai xu commented on YARN-4057:

Thanks for reporting and working on the issue. It is a good catch.
This is also an optimization even if ContainersMonitor is enabled, because we 
don't need call {{isEnabled}} every time ContainersMonitorEvent handler is 
The patch is a minor optimization and also a very safe change.
+1 for the patch, If no objection will commit it tomorrow.

> If ContainersMonitor is not enabled, only print related log info one time
> -------------------------------------------------------------------------
>                 Key: YARN-4057
>                 URL: https://issues.apache.org/jira/browse/YARN-4057
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: nodemanager
>            Reporter: Jun Gong
>            Assignee: Jun Gong
>            Priority: Minor
>         Attachments: YARN-4057.01.patch
> ContainersMonitorImpl will check whether it is enabled when handling every 
> event,  and it will print following messages again and again if not enabled:
> {quote}
> 2015-08-17 13:20:13,792 INFO 
> org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl:
>  Neither virutal-memory nor physical-memory is needed. Not running the 
> monitor-thread
> {quote}

This message was sent by Atlassian JIRA

Reply via email to