YARN-10737: Fix typos in CapacityScheduler#schedule. (#2911)
Contributed by Qi Zhu.
This commit is contained in:
parent
5404ab4bca
commit
d2b0675d61
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user