boolean finished = allSourceComplete && outputBuffers.isNoMoreBufferIds();
// update tasks
for (RemoteTask task : tasks.values()) {
for (Entry<PlanNodeId, URI> entry : newExchangeLocations.entries()) {
Split remoteSplit = createRemoteSplitFor(task.getNodeId(), entry.getValue());
task.addSplits(entry.getKey(), ImmutableList.of(remoteSplit));
}
task.setOutputBuffers(outputBuffers);
for (PlanNodeId completeSource : completeSources) {
task.noMoreSplits(completeSource);