Search in sources :

Example 1 with PendingReduction

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();
}
Also used : CloudMethodWorker(es.bsc.compss.types.resources.CloudMethodWorker) WorkerResourceDescription(es.bsc.compss.types.resources.WorkerResourceDescription) PendingReduction(es.bsc.compss.types.resources.updates.PendingReduction) BlockedActionException(es.bsc.compss.scheduler.exceptions.BlockedActionException) UnassignedActionException(es.bsc.compss.scheduler.exceptions.UnassignedActionException) FailedActionException(es.bsc.compss.scheduler.exceptions.FailedActionException)

Aggregations

BlockedActionException (es.bsc.compss.scheduler.exceptions.BlockedActionException)1 FailedActionException (es.bsc.compss.scheduler.exceptions.FailedActionException)1 UnassignedActionException (es.bsc.compss.scheduler.exceptions.UnassignedActionException)1 CloudMethodWorker (es.bsc.compss.types.resources.CloudMethodWorker)1 WorkerResourceDescription (es.bsc.compss.types.resources.WorkerResourceDescription)1 PendingReduction (es.bsc.compss.types.resources.updates.PendingReduction)1