Class ProcTimeDeduplicateKeepLastRowFunction

  • All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.RichFunction

    public class ProcTimeDeduplicateKeepLastRowFunction
    extends org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,​IN,​OUT>
    This function is used to deduplicate on keys and keeps only last row.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.flink.streaming.api.functions.KeyedProcessFunction

        org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context, org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.flink.api.common.typeutils.TypeSerializer<OUT> serializer  
      protected org.apache.flink.api.common.state.ValueState<T> state  
      protected long stateRetentionTime  
      protected org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void open​(org.apache.flink.configuration.Configuration configure)  
      void processElement​(org.apache.flink.table.data.RowData input, org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)  
      • Methods inherited from class org.apache.flink.streaming.api.functions.KeyedProcessFunction

        onTimer
      • Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction

        close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
    • Field Detail

      • typeInfo

        protected final org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo
      • stateRetentionTime

        protected final long stateRetentionTime
      • serializer

        protected final org.apache.flink.api.common.typeutils.TypeSerializer<OUT> serializer
      • state

        protected org.apache.flink.api.common.state.ValueState<T> state
    • Constructor Detail

      • ProcTimeDeduplicateKeepLastRowFunction

        public ProcTimeDeduplicateKeepLastRowFunction​(InternalTypeInfo<org.apache.flink.table.data.RowData> typeInfo,
                                                      long stateRetentionTime,
                                                      boolean generateUpdateBefore,
                                                      boolean generateInsert,
                                                      boolean inputInsertOnly,
                                                      GeneratedRecordEqualiser genRecordEqualiser)
    • Method Detail

      • open

        public void open​(org.apache.flink.configuration.Configuration configure)
                  throws Exception
        Specified by:
        open in interface org.apache.flink.api.common.functions.RichFunction
        Throws:
        Exception
      • processElement

        public void processElement​(org.apache.flink.table.data.RowData input,
                                   org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx,
                                   org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)
                            throws Exception
        Specified by:
        processElement in class org.apache.flink.streaming.api.functions.KeyedProcessFunction<org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData>
        Throws:
        Exception