use of org.apache.hyracks.api.service.IControllerService in project asterixdb by apache.
the class StartupTaskResponseMessage method handle.
@Override
public void handle(INcApplicationContext appCtx) throws HyracksDataException, InterruptedException {
INCMessageBroker broker = (INCMessageBroker) appCtx.getServiceContext().getMessageBroker();
IControllerService cs = appCtx.getServiceContext().getControllerService();
boolean success = true;
HyracksDataException exception = null;
try {
for (INCLifecycleTask task : tasks) {
task.perform(cs);
}
} catch (HyracksDataException e) {
success = false;
exception = e;
}
NCLifecycleTaskReportMessage result = new NCLifecycleTaskReportMessage(nodeId, success);
result.setException(exception);
try {
broker.sendMessageToCC(result);
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Failed sending message to cc", e);
throw HyracksDataException.create(e);
}
}
Aggregations