YARN-7678. Ability to enable logging of container memory stats. Contributed by Jim Brennan

This commit is contained in:
Jason Lowe 2018-01-04 10:21:40 -06:00
parent f2a1d5f3a1
commit 42964c2a66
1 changed files with 6 additions and 4 deletions

View File

@ -52,8 +52,10 @@ import java.util.Arrays;
public class ContainersMonitorImpl extends AbstractService implements
ContainersMonitor {
final static Logger LOG =
private final static Logger LOG =
LoggerFactory.getLogger(ContainersMonitorImpl.class);
private final static Logger AUDITLOG =
LoggerFactory.getLogger(ContainersMonitorImpl.class.getName()+".audit");
private long monitoringInterval;
private MonitoringThread monitoringThread;
@ -498,8 +500,8 @@ public class ContainersMonitorImpl extends AbstractService implements
long curRssMemUsageOfAgedProcesses = pTree.getRssMemorySize(1);
long vmemLimit = ptInfo.getVmemLimit();
long pmemLimit = ptInfo.getPmemLimit();
if (LOG.isDebugEnabled()) {
LOG.debug(String.format(
if (AUDITLOG.isDebugEnabled()) {
AUDITLOG.debug(String.format(
"Memory usage of ProcessTree %s for container-id %s: ",
pId, containerId.toString()) +
formatUsageString(