Search in sources :

Example 1 with APRequest

use of es.bsc.compss.types.request.ap.APRequest in project compss by bsc-wdc.

the class AccessProcessor method run.

@Override
public void run() {
    while (keepGoing) {
        APRequest request = null;
        try {
            request = requestQueue.take();
            if (Tracer.isActivated()) {
                Tracer.emitEvent(Tracer.getAPRequestEvent(request.getRequestType().name()).getId(), Tracer.getRuntimeEventsType());
            }
            request.process(this, taskAnalyser, dataInfoProvider, taskDispatcher);
            if (Tracer.isActivated()) {
                Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());
            }
        } catch (ShutdownException se) {
            if (Tracer.isActivated()) {
                Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());
            }
            se.getSemaphore().release();
            break;
        } catch (Exception e) {
            LOGGER.error("Exception", e);
            if (Tracer.isActivated()) {
                Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());
            }
        }
    }
    LOGGER.info("AccessProcessor shutdown");
}
Also used : APRequest(es.bsc.compss.types.request.ap.APRequest) ShutdownException(es.bsc.compss.types.request.exceptions.ShutdownException) ShutdownException(es.bsc.compss.types.request.exceptions.ShutdownException) CannotLoadException(es.bsc.compss.exceptions.CannotLoadException)

Aggregations

CannotLoadException (es.bsc.compss.exceptions.CannotLoadException)1 APRequest (es.bsc.compss.types.request.ap.APRequest)1 ShutdownException (es.bsc.compss.types.request.exceptions.ShutdownException)1