Esempio n. 1
0
 public void resetPreemptedResources() {
   preemptedResources = Resources.createResource(0);
   for (RMContainer container : getPreemptionContainers()) {
     Resources.addTo(preemptedResources, container.getAllocatedResource());
   }
 }
Esempio n. 2
0
 // related methods
 public void addPreemption(RMContainer container, long time) {
   assert preemptionMap.get(container) == null;
   preemptionMap.put(container, time);
   Resources.addTo(preemptedResources, container.getAllocatedResource());
 }