From c69ba81497ae4da329ddb34ba712a64a7eec479f Mon Sep 17 00:00:00 2001 From: Tsuyoshi Ozawa Date: Wed, 1 Apr 2015 17:44:25 +0900 Subject: [PATCH] YARN-3424. Change logs for ContainerMonitorImpl's resourse monitoring from info to debug. Contributed by Anubhav Dhoot. --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../monitor/ContainersMonitorImpl.java | 13 ++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index f6093e2497..55004ee917 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -91,6 +91,9 @@ Release 2.8.0 - UNRELEASED YARN-3428. Debug log resources to be localized for a container. (kasha) + YARN-3424. Change logs for ContainerMonitorImpl's resourse monitoring + from info to debug. (Anubhav Dhoot via ozawa) + OPTIMIZATIONS YARN-3339. TestDockerContainerExecutor should pull a single image and not diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java index 5153051756..cce749e05f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java @@ -455,11 +455,14 @@ public void run() { long curRssMemUsageOfAgedProcesses = pTree.getRssMemorySize(1); long vmemLimit = ptInfo.getVmemLimit(); long pmemLimit = ptInfo.getPmemLimit(); - LOG.info(String.format( - "Memory usage of ProcessTree %s for container-id %s: ", - pId, containerId.toString()) + - formatUsageString( - currentVmemUsage, vmemLimit, currentPmemUsage, pmemLimit)); + if (LOG.isDebugEnabled()) { + LOG.debug(String.format( + "Memory usage of ProcessTree %s for container-id %s: ", + pId, containerId.toString()) + + formatUsageString( + currentVmemUsage, vmemLimit, + currentPmemUsage, pmemLimit)); + } // Add usage to container metrics if (containerMetricsEnabled) {