YARN-9329. updatePriority is blocked when using FairScheduler. Contributed by Jiandan Yang.

This commit is contained in:
Weiwei Yang 2019-02-26 00:08:13 +08:00
parent 6cec90653d
commit 3e1739d589

View File

@ -21,6 +21,7 @@
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.SettableFuture;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
@ -43,6 +44,7 @@
import org.apache.hadoop.yarn.api.records.ResourceOption;
import org.apache.hadoop.yarn.api.records.ResourceRequest;
import org.apache.hadoop.yarn.api.records.SchedulingRequest;
import org.apache.hadoop.yarn.api.records.Priority;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.exceptions
.SchedulerInvalidResoureRequestException;
@ -2009,4 +2011,13 @@ public long checkAndGetApplicationLifetime(String queueName, long lifetime) {
// Lifetime is the application lifetime by default.
return lifetime;
}
@Override
public Priority updateApplicationPriority(Priority newPriority,
ApplicationId applicationId, SettableFuture<Object> future,
UserGroupInformation user)
throws YarnException {
throw new YarnException(
"Update application priority is not supported in Fair Scheduler");
}
}