Search in sources :

Example 1 with PreemptableQueue

use of org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.preemption.PreemptableQueue in project hadoop by apache.

the class ProportionalCapacityPreemptionPolicy method syncKillableContainersFromScheduler.

private void syncKillableContainersFromScheduler() {
    // sync preemptable entities from scheduler
    preemptableQueues = scheduler.getPreemptionManager().getShallowCopyOfPreemptableQueues();
    killableContainers = new HashSet<>();
    for (Map.Entry<String, PreemptableQueue> entry : preemptableQueues.entrySet()) {
        PreemptableQueue entity = entry.getValue();
        for (Map<ContainerId, RMContainer> map : entity.getKillableContainers().values()) {
            killableContainers.addAll(map.keySet());
        }
    }
}
Also used : PreemptableQueue(org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.preemption.PreemptableQueue) ContainerId(org.apache.hadoop.yarn.api.records.ContainerId) HashMap(java.util.HashMap) Map(java.util.Map) RMContainer(org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 ContainerId (org.apache.hadoop.yarn.api.records.ContainerId)1 RMContainer (org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer)1 PreemptableQueue (org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.preemption.PreemptableQueue)1