Class WrappingCollector<T>

  • All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.RichFunction, org.apache.flink.util.Collector<T>

    public abstract class WrappingCollector<T>
    extends org.apache.flink.api.common.functions.AbstractRichFunction
    implements org.apache.flink.util.Collector<T>
    A Collector that wraps another collector. An implementation can decide when to emit to the wrapped collector.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void outputResult​(T result)
      Outputs the final result to the wrapped collector.
      void setCollector​(org.apache.flink.util.Collector<T> collector)
      Sets the current collector which is used to emit the final result.
      • Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction

        getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
      • Methods inherited from interface org.apache.flink.util.Collector

        collect
      • Methods inherited from interface org.apache.flink.api.common.functions.RichFunction

        open
    • Constructor Detail

      • WrappingCollector

        public WrappingCollector()
    • Method Detail

      • setCollector

        public void setCollector​(org.apache.flink.util.Collector<T> collector)
        Sets the current collector which is used to emit the final result.
      • outputResult

        public void outputResult​(T result)
        Outputs the final result to the wrapped collector.
      • close

        public void close()
        Specified by:
        close in interface org.apache.flink.util.Collector<T>
        Specified by:
        close in interface org.apache.flink.api.common.functions.RichFunction
        Overrides:
        close in class org.apache.flink.api.common.functions.AbstractRichFunction