@Override public synchronized void noMoreSplits(PlanNodeId sourceId) { noMoreSplits.add(sourceId); boolean allSourcesComplete = Stream.concat(fragment.getPartitionedSourceNodes().stream(), fragment.getRemoteSourceNodes().stream()) .filter(Objects::nonNull) .map(PlanNode::getId) .allMatch(noMoreSplits::contains); if (allSourcesComplete) { taskStateMachine.finished(); } }
@Override public synchronized void noMoreSplits(PlanNodeId sourceId) { noMoreSplits.add(sourceId); boolean allSourcesComplete = Stream.concat(fragment.getPartitionedSourceNodes().stream(), fragment.getRemoteSourceNodes().stream()) .filter(Objects::nonNull) .map(PlanNode::getId) .allMatch(noMoreSplits::contains); if (allSourcesComplete) { taskStateMachine.finished(); } }
private synchronized void checkTaskCompletion() { if (taskStateMachine.getState().isDone()) { return; } // are there more partition splits expected? for (DriverSplitRunnerFactory driverSplitRunnerFactory : driverRunnerFactoriesWithSplitLifeCycle.values()) { if (!driverSplitRunnerFactory.isNoMoreDriverRunner()) { return; } } // do we still have running tasks? if (status.getRemainingDriver() != 0) { return; } // no more output will be created outputBuffer.setNoMorePages(); // are there still pages in the output buffer if (!outputBuffer.isFinished()) { return; } // Cool! All done! taskStateMachine.finished(); }
private synchronized void checkTaskCompletion() { if (taskStateMachine.getState().isDone()) { return; } // are there more partition splits expected? for (DriverSplitRunnerFactory driverSplitRunnerFactory : driverRunnerFactoriesWithSplitLifeCycle.values()) { if (!driverSplitRunnerFactory.isNoMoreDriverRunner()) { return; } } // do we still have running tasks? if (status.getRemainingDriver() != 0) { return; } // no more output will be created outputBuffer.setNoMorePages(); // are there still pages in the output buffer if (!outputBuffer.isFinished()) { return; } // Cool! All done! taskStateMachine.finished(); }