From d2b0675d6132c271feb506fcac699db63962d9b0 Mon Sep 17 00:00:00 2001 From: zhuqi Date: Fri, 14 May 2021 13:12:28 +0800 Subject: [PATCH] YARN-10737: Fix typos in CapacityScheduler#schedule. (#2911) Contributed by Qi Zhu. --- .../scheduler/capacity/CapacityScheduler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 1e81f67df9..ebf4b9d50a 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 @@ -605,10 +605,10 @@ static void schedule(CapacityScheduler cs) throws InterruptedException{ // First randomize the start point int start = random.nextInt(partitionSize); // Allocate containers of partition [start, end) - for (String partititon : partitions) { + for (String partition : partitions) { if (current++ >= start) { CandidateNodeSet candidates = - cs.getCandidateNodeSet(partititon); + cs.getCandidateNodeSet(partition); if (candidates == null) { continue; } @@ -619,12 +619,12 @@ static void schedule(CapacityScheduler cs) throws InterruptedException{ current = 0; // Allocate containers of partition [0, start) - for (String partititon : partitions) { + for (String partition : partitions) { if (current++ > start) { break; } CandidateNodeSet candidates = - cs.getCandidateNodeSet(partititon); + cs.getCandidateNodeSet(partition); if (candidates == null) { continue; }