From 33c1988595757128a54f5512b621e4fe645a25eb Mon Sep 17 00:00:00 2001 From: Karthik Kambatla Date: Wed, 17 Feb 2016 17:44:35 -0800 Subject: [PATCH] YARN-4689. FairScheduler: Cleanup preemptContainer to be more readable. (Kai Sasaki via kasha) (cherry picked from commit 2ab4c476ed22d3ccf15b215710b67e32bbc7e5f0) --- hadoop-yarn-project/CHANGES.txt | 4 ++++ .../resourcemanager/scheduler/fair/FSParentQueue.java | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index aaf4b56513e..1f36d622aea 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -73,6 +73,10 @@ Release 2.9.0 - UNRELEASED YARN-4655. Log uncaught exceptions/errors in various thread pools in YARN. (Sidharta Seethana via vvasudev) + YARN-4689. FairScheduler: Cleanup preemptContainer to be more readable. + (Kai Sasaki via kasha) + + OPTIMIZATIONS BUG FIXES 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/fair/FSParentQueue.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSParentQueue.java index a028422220e..d9fac905de5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSParentQueue.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSParentQueue.java @@ -266,10 +266,8 @@ public class FSParentQueue extends FSQueue { LOG.debug("skipping from queue=" + getName() + " because it's a non-preemptable queue"); } - continue; - } - if (candidateQueue == null || - comparator.compare(queue, candidateQueue) > 0) { + } else if (candidateQueue == null || + comparator.compare(queue, candidateQueue) > 0) { candidateQueue = queue; } }