Class DataSinkFunctionOperator

  • All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.state.CheckpointListener, org.apache.flink.streaming.api.operators.Input<Event>, org.apache.flink.streaming.api.operators.KeyContext, org.apache.flink.streaming.api.operators.KeyContextHandler, org.apache.flink.streaming.api.operators.OneInputStreamOperator<Event,​Object>, org.apache.flink.streaming.api.operators.OutputTypeConfigurable<Object>, org.apache.flink.streaming.api.operators.SetupableStreamOperator<Object>, org.apache.flink.streaming.api.operators.StreamOperator<Object>, org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator, org.apache.flink.streaming.api.operators.UserFunctionProvider<org.apache.flink.streaming.api.functions.sink.SinkFunction<Event>>, org.apache.flink.streaming.api.operators.YieldingOperator<Object>

    @Internal
    public class DataSinkFunctionOperator
    extends org.apache.flink.streaming.api.operators.StreamSink<Event>
    An operator that processes records to be written into a SinkFunction.

    The operator is a proxy of StreamSink in Flink.

    The operator is always part of a sink pipeline and is the first operator.

    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator

        userFunction
      • Fields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator

        chainingStrategy, config, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
    • Constructor Summary

      Constructors 
      Constructor Description
      DataSinkFunctionOperator​(org.apache.flink.streaming.api.functions.sink.SinkFunction<Event> userFunction, org.apache.flink.runtime.jobgraph.OperatorID schemaOperatorID)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void initializeState​(org.apache.flink.runtime.state.StateInitializationContext context)  
      void processElement​(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<Event> element)  
      void setup​(org.apache.flink.streaming.runtime.tasks.StreamTask<?,​?> containingTask, org.apache.flink.streaming.api.graph.StreamConfig config, org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<Object>> output)  
      • Methods inherited from class org.apache.flink.streaming.api.operators.StreamSink

        open, processWatermark, reportOrForwardLatencyMarker
      • Methods inherited from class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator

        close, finish, getUserFunction, getUserFunctionParameters, notifyCheckpointAborted, notifyCheckpointComplete, setOutputType, snapshotState
      • Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator

        getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, isUsingCustomRawKeyedState, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, snapshotState, useSplittableTimers
      • Methods inherited from interface org.apache.flink.api.common.state.CheckpointListener

        notifyCheckpointAborted, notifyCheckpointComplete
      • Methods inherited from interface org.apache.flink.streaming.api.operators.Input

        processLatencyMarker, processRecordAttributes, processWatermarkStatus
      • Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContext

        getCurrentKey, setCurrentKey
      • Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler

        hasKeyContext
      • Methods inherited from interface org.apache.flink.streaming.api.operators.OneInputStreamOperator

        setKeyContextElement
      • Methods inherited from interface org.apache.flink.streaming.api.operators.StreamOperator

        close, finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
    • Constructor Detail

      • DataSinkFunctionOperator

        public DataSinkFunctionOperator​(org.apache.flink.streaming.api.functions.sink.SinkFunction<Event> userFunction,
                                        org.apache.flink.runtime.jobgraph.OperatorID schemaOperatorID)
    • Method Detail

      • setup

        public void setup​(org.apache.flink.streaming.runtime.tasks.StreamTask<?,​?> containingTask,
                          org.apache.flink.streaming.api.graph.StreamConfig config,
                          org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<Object>> output)
        Specified by:
        setup in interface org.apache.flink.streaming.api.operators.SetupableStreamOperator<Object>
        Overrides:
        setup in class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<Object,​org.apache.flink.streaming.api.functions.sink.SinkFunction<Event>>
      • initializeState

        public void initializeState​(org.apache.flink.runtime.state.StateInitializationContext context)
                             throws Exception
        Specified by:
        initializeState in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator
        Overrides:
        initializeState in class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<Object,​org.apache.flink.streaming.api.functions.sink.SinkFunction<Event>>
        Throws:
        Exception
      • processElement

        public void processElement​(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<Event> element)
                            throws Exception
        Specified by:
        processElement in interface org.apache.flink.streaming.api.operators.Input<Event>
        Overrides:
        processElement in class org.apache.flink.streaming.api.operators.StreamSink<Event>
        Throws:
        Exception