Interface TwoInputBroadcastStreamProcessFunction<IN1,​IN2,​OUT>

    • Method Detail

      • processRecordFromNonBroadcastInput

        void processRecordFromNonBroadcastInput​(IN1 record,
                                                Collector<OUT> output,
                                                PartitionedContext ctx)
                                         throws Exception
        Process record from non-broadcast input and emit data through Collector.
        Parameters:
        record - to process.
        output - to emit processed records.
        ctx - runtime context in which this function is executed.
        Throws:
        Exception
      • processRecordFromBroadcastInput

        void processRecordFromBroadcastInput​(IN2 record,
                                             NonPartitionedContext<OUT> ctx)
                                      throws Exception
        Process record from broadcast input. In general, the broadcast side is not allowed to manipulate state and output data because it corresponds to all partitions instead of a single partition. But you could use broadcast context to process all the partitions at once.
        Parameters:
        record - to process.
        ctx - the context in which this function is executed.
        Throws:
        Exception
      • endNonBroadcastInput

        default void endNonBroadcastInput​(NonPartitionedContext<OUT> ctx)
        This is a life-cycle method indicates that this function will no longer receive any data from the non-broadcast input.
        Parameters:
        ctx - the context in which this function is executed.
      • endBroadcastInput

        default void endBroadcastInput​(NonPartitionedContext<OUT> ctx)
        This is a life-cycle method indicates that this function will no longer receive any data from the broadcast input.
        Parameters:
        ctx - the context in which this function is executed.
      • onProcessingTimer

        default void onProcessingTimer​(long timestamp,
                                       Collector<OUT> output,
                                       PartitionedContext ctx)
        Callback for processing timer.
        Parameters:
        timestamp - when this callback is triggered.
        output - to emit record.
        ctx - runtime context in which this function is executed.