Search in sources :

Example 1 with IMessage

use of org.apache.hyracks.api.messages.IMessage in project asterixdb by apache.

the class ApplicationMessageWork method runWork.

@Override
public void runWork() {
    final ICCServiceContext ctx = ccs.getContext();
    try {
        final IMessage data = (IMessage) DeploymentUtils.deserialize(message, deploymentId, ctx);
        ccs.getExecutor().execute(new Runnable() {

            @Override
            public void run() {
                try {
                    ctx.getMessageBroker().receivedMessage(data, nodeId);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        });
    } catch (Exception e) {
        LOGGER.log(Level.WARNING, "Error in stats reporting", e);
        throw new RuntimeException(e);
    }
}
Also used : ICCServiceContext(org.apache.hyracks.api.application.ICCServiceContext) IMessage(org.apache.hyracks.api.messages.IMessage)

Aggregations

ICCServiceContext (org.apache.hyracks.api.application.ICCServiceContext)1 IMessage (org.apache.hyracks.api.messages.IMessage)1