YARN-10737: Fix typos in CapacityScheduler#schedule. (#2911)

Contributed by Qi Zhu.
This commit is contained in:
zhuqi 2021-05-14 13:12:28 +08:00 committed by GitHub
parent 5404ab4bca
commit d2b0675d61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<FiCaSchedulerNode> 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<FiCaSchedulerNode> candidates =
cs.getCandidateNodeSet(partititon);
cs.getCandidateNodeSet(partition);
if (candidates == null) {
continue;
}