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
|
// First randomize the start point
|
||||||
int start = random.nextInt(partitionSize);
|
int start = random.nextInt(partitionSize);
|
||||||
// Allocate containers of partition [start, end)
|
// Allocate containers of partition [start, end)
|
||||||
for (String partititon : partitions) {
|
for (String partition : partitions) {
|
||||||
if (current++ >= start) {
|
if (current++ >= start) {
|
||||||
CandidateNodeSet<FiCaSchedulerNode> candidates =
|
CandidateNodeSet<FiCaSchedulerNode> candidates =
|
||||||
cs.getCandidateNodeSet(partititon);
|
cs.getCandidateNodeSet(partition);
|
||||||
if (candidates == null) {
|
if (candidates == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -619,12 +619,12 @@ static void schedule(CapacityScheduler cs) throws InterruptedException{
|
|||||||
current = 0;
|
current = 0;
|
||||||
|
|
||||||
// Allocate containers of partition [0, start)
|
// Allocate containers of partition [0, start)
|
||||||
for (String partititon : partitions) {
|
for (String partition : partitions) {
|
||||||
if (current++ > start) {
|
if (current++ > start) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
CandidateNodeSet<FiCaSchedulerNode> candidates =
|
CandidateNodeSet<FiCaSchedulerNode> candidates =
|
||||||
cs.getCandidateNodeSet(partititon);
|
cs.getCandidateNodeSet(partition);
|
||||||
if (candidates == null) {
|
if (candidates == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user