Class WrappingCollector<T>

java.lang.Object
org.apache.flink.api.common.functions.AbstractRichFunction
org.apache.flink.table.runtime.collector.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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    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 class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.flink.util.Collector

    collect
  • Constructor Details

    • WrappingCollector

      public WrappingCollector()
  • Method Details

    • 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