use of es.bsc.compss.types.resources.updates.PendingReduction in project compss by bsc-wdc.
the class ReduceWorkerAction method doAction.
@Override
protected void doAction() {
(new Thread() {
@SuppressWarnings("unchecked")
@Override
public void run() {
Thread.currentThread().setName(worker.getName() + " stopper");
CloudMethodWorker w = (CloudMethodWorker) worker.getResource();
PendingReduction<WorkerResourceDescription> crd = (PendingReduction<WorkerResourceDescription>) ru;
ResourceManager.reduceResource(w, crd);
w.endTask((MethodResourceDescription) getResourceConsumption());
try {
ru.waitForCompletion();
} catch (Exception e) {
LOGGER.error("ERROR: Exception raised on worker reduction", e);
ErrorManager.warn("Exception reducing worker. Check runtime.log for more details", e);
notifyError();
}
notifyCompleted();
}
}).start();
}
Aggregations