From 506502bb8301f3b4a68e5f692a2af0624980468e Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Wed, 20 Mar 2019 19:12:19 -0400 Subject: [PATCH] YARN-9370. Added logging for recovering assigned GPU devices. Contributed by Yesha Vora --- .../linux/resources/gpu/GpuResourceAllocator.java | 4 ++++ 1 file changed, 4 insertions(+) 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/linux/resources/gpu/GpuResourceAllocator.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/gpu/GpuResourceAllocator.java index 67936ba3b7d..0b95ca7d932 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/gpu/GpuResourceAllocator.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/gpu/GpuResourceAllocator.java @@ -119,6 +119,7 @@ public class GpuResourceAllocator { + containerId); } + LOG.info("Starting recovery of GpuDevice for {}.", containerId); for (Serializable gpuDeviceSerializable : c.getResourceMappings() .getAssignedResources(GPU_URI)) { if (!(gpuDeviceSerializable instanceof GpuDevice)) { @@ -146,7 +147,10 @@ public class GpuResourceAllocator { } usedDevices.put(gpuDevice, containerId); + LOG.info("ContainerId {} is assigned to GpuDevice {} on recovery.", + containerId, gpuDevice); } + LOG.info("Finished recovery of GpuDevice for {}.", containerId); } /**