From ebe3ed5cd3e7739ff2baf91eef87581798a0ac9a Mon Sep 17 00:00:00 2001 From: Szilard Nemeth Date: Fri, 12 Nov 2021 15:42:14 +0100 Subject: [PATCH] YARN-10997. Revisit allocation and reservation logging. Contributed by Andras Gyori (cherry picked from commit 7cb887e6c2bfc058bb7b7d7bde2554d261432bdb) --- .../scheduler/capacity/CapacityScheduler.java | 2 -- .../scheduler/common/fica/FiCaSchedulerApp.java | 13 +++++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java index ba1ab940f5..e378c273f8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java @@ -3131,13 +3131,11 @@ public boolean tryCommit(Resource cluster, ResourceCommitRequest r, long commitSuccess = System.nanoTime() - commitStart; CapacitySchedulerMetrics.getMetrics() .addCommitSuccess(commitSuccess); - LOG.info("Allocation proposal accepted"); isSuccess = true; } else{ long commitFailed = System.nanoTime() - commitStart; CapacitySchedulerMetrics.getMetrics() .addCommitFailure(commitFailed); - LOG.info("Failed to accept allocation proposal"); } LOG.debug("Allocation proposal accepted={}, proposal={}", isSuccess, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/common/fica/FiCaSchedulerApp.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/common/fica/FiCaSchedulerApp.java index 6507259f10..93992499af 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/common/fica/FiCaSchedulerApp.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/common/fica/FiCaSchedulerApp.java @@ -357,6 +357,7 @@ private boolean commonCheckContainerAllocation( // adding NP check as this proposal could not be allocated from reserved // container in async-scheduling mode if (allocation.getAllocateFromReservedContainer() == null) { + LOG.debug("Trying to allocate from reserved container in async scheduling mode"); return false; } RMContainer fromReservedContainer = @@ -572,6 +573,8 @@ public boolean apply(Resource cluster, ResourceCommitRequest