throws InterruptedException
{
AtomicInteger nextTaskId = new AtomicInteger(0);
long getSplitStart = System.nanoTime();
SplitSource splitSource = this.dataSource.get();
while (!splitSource.isFinished()) {
getSplitDistribution.add(System.nanoTime() - getSplitStart);
// if query has been canceled, exit cleanly; query will never run regardless
if (getState().isDone()) {
break;
}
Multimap<Node, Split> nodeSplits = ArrayListMultimap.create();
for (Split split : splitSource.getNextBatch(splitBatchSize)) {
Node node = chooseNode(nodeSelector, split, nextTaskId);
nodeSplits.put(node, split);
}
for (Entry<Node, Collection<Split>> taskSplits : nodeSplits.asMap().entrySet()) {