Search in sources :

Example 1 with NoMoreSplitsEvent

use of org.apache.flink.runtime.source.event.NoMoreSplitsEvent in project flink by apache.

the class SourceCoordinatorContext method signalNoMoreSplits.

@Override
public void signalNoMoreSplits(int subtask) {
    checkSubtaskIndex(subtask);
    // Ensure the split assignment is done by the coordinator executor.
    callInCoordinatorThread(() -> {
        final OperatorCoordinator.SubtaskGateway gateway = getGatewayAndCheckReady(subtask);
        gateway.sendEvent(new NoMoreSplitsEvent());
        // void return value
        return null;
    }, "Failed to send 'NoMoreSplits' to reader " + subtask);
}
Also used : NoMoreSplitsEvent(org.apache.flink.runtime.source.event.NoMoreSplitsEvent) OperatorCoordinator(org.apache.flink.runtime.operators.coordination.OperatorCoordinator)

Aggregations

OperatorCoordinator (org.apache.flink.runtime.operators.coordination.OperatorCoordinator)1 NoMoreSplitsEvent (org.apache.flink.runtime.source.event.NoMoreSplitsEvent)1