From 457c8404b9162ea3656447fe6174359b03128c7c Mon Sep 17 00:00:00 2001 From: Jim Brennan Date: Tue, 16 Feb 2021 16:45:35 +0000 Subject: [PATCH] [YARN-10626] Log resource allocation in NM log at container start time. Contributed by Eric Badger (cherry picked from commit 3fcc7a55b6ee8f93ff01061aec0aefc81d98eaab) --- .../nodemanager/containermanager/ContainerManagerImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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/ContainerManagerImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/ContainerManagerImpl.java index 2cb334bf7f..5eb36ba558 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/ContainerManagerImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/ContainerManagerImpl.java @@ -1082,8 +1082,10 @@ protected void startContainerInternal( ContainerId containerId = containerTokenIdentifier.getContainerID(); String containerIdStr = containerId.toString(); String user = containerTokenIdentifier.getApplicationSubmitter(); + Resource containerResource = containerTokenIdentifier.getResource(); - LOG.info("Start request for " + containerIdStr + " by user " + remoteUser); + LOG.info("Start request for " + containerIdStr + " by user " + remoteUser + + " with resource " + containerResource); ContainerLaunchContext launchContext = request.getContainerLaunchContext();