YARN-7636. Re-reservation count may overflow when cluster resource exhausted for a long time. contributed by Tao Yang.
This commit is contained in:
parent
ba9a656ffa
commit
7c286fe804
|
@ -401,7 +401,11 @@ public class SchedulerApplicationAttempt implements SchedulableEntity {
|
|||
|
||||
protected void addReReservation(
|
||||
SchedulerRequestKey schedulerKey) {
|
||||
reReservations.add(schedulerKey);
|
||||
try {
|
||||
reReservations.add(schedulerKey);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// This happens when count = MAX_INT, ignore the exception
|
||||
}
|
||||
}
|
||||
|
||||
public int getReReservations(SchedulerRequestKey schedulerKey) {
|
||||
|
@ -932,8 +936,13 @@ public class SchedulerApplicationAttempt implements SchedulableEntity {
|
|||
|
||||
public int addMissedNonPartitionedRequestSchedulingOpportunity(
|
||||
SchedulerRequestKey schedulerKey) {
|
||||
return missedNonPartitionedReqSchedulingOpportunity.add(
|
||||
schedulerKey, 1) + 1;
|
||||
try {
|
||||
return missedNonPartitionedReqSchedulingOpportunity.add(
|
||||
schedulerKey, 1) + 1;
|
||||
} catch (IllegalArgumentException e) {
|
||||
// This happens when count = MAX_INT, ignore the exception
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
public void
|
||||
|
|
Loading…
Reference in New Issue