YARN-7678. Ability to enable logging of container memory stats. Contributed by Jim Brennan
This commit is contained in:
parent
45a47198b4
commit
d795661868
@ -59,6 +59,8 @@ public class ContainersMonitorImpl extends AbstractService implements
|
|||||||
|
|
||||||
private final static Logger LOG =
|
private final static Logger LOG =
|
||||||
LoggerFactory.getLogger(ContainersMonitorImpl.class);
|
LoggerFactory.getLogger(ContainersMonitorImpl.class);
|
||||||
|
private final static Logger AUDITLOG =
|
||||||
|
LoggerFactory.getLogger(ContainersMonitorImpl.class.getName()+".audit");
|
||||||
|
|
||||||
private long monitoringInterval;
|
private long monitoringInterval;
|
||||||
private MonitoringThread monitoringThread;
|
private MonitoringThread monitoringThread;
|
||||||
@ -595,8 +597,8 @@ private void recordUsage(ContainerId containerId, String pId,
|
|||||||
* maxVCoresAllottedForContainers /nodeCpuPercentageForYARN);
|
* maxVCoresAllottedForContainers /nodeCpuPercentageForYARN);
|
||||||
long vmemLimit = ptInfo.getVmemLimit();
|
long vmemLimit = ptInfo.getVmemLimit();
|
||||||
long pmemLimit = ptInfo.getPmemLimit();
|
long pmemLimit = ptInfo.getPmemLimit();
|
||||||
if (LOG.isDebugEnabled()) {
|
if (AUDITLOG.isDebugEnabled()) {
|
||||||
LOG.debug(String.format(
|
AUDITLOG.debug(String.format(
|
||||||
"Memory usage of ProcessTree %s for container-id %s: ",
|
"Memory usage of ProcessTree %s for container-id %s: ",
|
||||||
pId, containerId.toString()) +
|
pId, containerId.toString()) +
|
||||||
formatUsageString(
|
formatUsageString(
|
||||||
|
Loading…
Reference in New Issue
Block a user