use of org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryFailResponse in project ignite by apache.
the class GridMapQueryExecutor method sendError.
/**
* @param node Node.
* @param qryReqId Query request ID.
* @param err Error.
*/
private void sendError(ClusterNode node, long qryReqId, Throwable err) {
try {
GridQueryFailResponse msg = new GridQueryFailResponse(qryReqId, err);
if (node.isLocal()) {
U.error(log, "Failed to run map query on local node.", err);
h2.reduceQueryExecutor().onMessage(ctx.localNodeId(), msg);
} else
ctx.io().sendToGridTopic(node, GridTopic.TOPIC_QUERY, msg, QUERY_POOL);
} catch (Exception e) {
e.addSuppressed(err);
U.error(log, "Failed to send error message.", e);
}
}
use of org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryFailResponse in project ignite by apache.
the class GridReduceQueryExecutor method onMessage.
/**
* @param nodeId Node ID.
* @param msg Message.
*/
public void onMessage(UUID nodeId, Object msg) {
try {
assert msg != null;
ClusterNode node = ctx.discovery().node(nodeId);
if (node == null)
// Node left, ignore.
return;
boolean processed = true;
if (msg instanceof GridQueryNextPageResponse)
onNextPage(node, (GridQueryNextPageResponse) msg);
else if (msg instanceof GridQueryFailResponse)
onFail(node, (GridQueryFailResponse) msg);
else if (msg instanceof GridH2DmlResponse)
onDmlResponse(node, (GridH2DmlResponse) msg);
else
processed = false;
if (processed && log.isDebugEnabled())
log.debug("Processed response: " + nodeId + "->" + ctx.localNodeId() + " " + msg);
} catch (Throwable th) {
U.error(log, "Failed to process message: " + msg, th);
}
}
Aggregations