use of io.crate.execution.dsl.phases.NodeOperationTree in project crate by crate.
the class JobLauncher method execute.
public void execute(RowConsumer consumer, TransactionContext txnCtx) {
assert nodeOperationTrees.size() == 1 : "must only have 1 NodeOperationTree for non-bulk operations";
NodeOperationTree nodeOperationTree = nodeOperationTrees.get(0);
Map<String, Collection<NodeOperation>> operationByServer = NodeOperationGrouper.groupByServer(nodeOperationTree.nodeOperations());
List<ExecutionPhase> handlerPhases = Collections.singletonList(nodeOperationTree.leaf());
List<RowConsumer> handlerConsumers = Collections.singletonList(consumer);
try {
setupTasks(txnCtx, operationByServer, handlerPhases, handlerConsumers);
} catch (Throwable throwable) {
consumer.accept(null, throwable);
}
}
Aggregations