Class PreemptionCandidatesSelector
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity.PreemptionCandidatesSelector
- Direct Known Subclasses:
FifoCandidatesSelector,IntraQueueCandidatesSelector,QueuePriorityContainerCandidateSelector,ReservedContainerCandidatesSelector
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CapacitySchedulerPreemptionContextprotected org.apache.hadoop.yarn.util.resource.ResourceCalculator -
Method Summary
Modifier and TypeMethodDescriptionlongabstract Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId,Set<RMContainer>> selectCandidates(Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId, Set<RMContainer>> selectedCandidates, org.apache.hadoop.yarn.api.records.Resource clusterResource, org.apache.hadoop.yarn.api.records.Resource totalPreemptedResourceAllowed) Get preemption candidates from computed resource sharing and already selected candidates.voidsetMaximumKillWaitTime(long maximumKillWaitTime)
-
Field Details
-
preemptionContext
-
rc
protected org.apache.hadoop.yarn.util.resource.ResourceCalculator rc
-
-
Method Details
-
selectCandidates
public abstract Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId,Set<RMContainer>> selectCandidates(Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId, Set<RMContainer>> selectedCandidates, org.apache.hadoop.yarn.api.records.Resource clusterResource, org.apache.hadoop.yarn.api.records.Resource totalPreemptedResourceAllowed) Get preemption candidates from computed resource sharing and already selected candidates.- Parameters:
selectedCandidates- already selected candidates from previous policiesclusterResource- total resourcetotalPreemptedResourceAllowed- how many resources allowed to be preempted in this round. Should be updated(in-place set) after the call- Returns:
- merged selected candidates.
-
getMaximumKillWaitTimeMs
public long getMaximumKillWaitTimeMs() -
setMaximumKillWaitTime
public void setMaximumKillWaitTime(long maximumKillWaitTime)
-