Interface SupportsHandleExecutionAttemptSourceEvent


  • @PublicEvolving
    public interface SupportsHandleExecutionAttemptSourceEvent
    An decorative interface of SplitEnumerator which allows to handle SourceEvent sent from a specific execution attempt.

    The split enumerator must implement this interface if it needs to deal with custom source events and is used in cases that a subtask can have multiple concurrent execution attempts, e.g. if speculative execution is enabled. Otherwise an error will be thrown when the split enumerator receives a custom source event.

    • Method Detail

      • handleSourceEvent

        void handleSourceEvent​(int subtaskId,
                               int attemptNumber,
                               SourceEvent sourceEvent)
        Handles a custom source event from the source reader. It is similar to SplitEnumerator.handleSourceEvent(int, SourceEvent) but is aware of the subtask execution attempt who sent this event.
        Parameters:
        subtaskId - the subtask id of the source reader who sent the source event.
        attemptNumber - the attempt number of the source reader who sent the source event.
        sourceEvent - the source event from the source reader.