Class Utils.CountHelper<T>

  • Type Parameters:
    T - Type of elements to count.
    All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.io.OutputFormat<T>
    Enclosing class:
    Utils

    public static class Utils.CountHelper<T>
    extends org.apache.flink.api.common.io.RichOutputFormat<T>
    Utility sink function that counts elements and writes the count into an accumulator, from which it can be retrieved by the client. This sink is used by the DataSet.count() function.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.flink.api.common.io.OutputFormat

        org.apache.flink.api.common.io.OutputFormat.InitializationContext
    • Constructor Summary

      Constructors 
      Constructor Description
      CountHelper​(String id)  
    • Constructor Detail

      • CountHelper

        public CountHelper​(String id)
    • Method Detail

      • configure

        public void configure​(org.apache.flink.configuration.Configuration parameters)
      • open

        public void open​(int taskNumber,
                         int numTasks)
      • writeRecord

        public void writeRecord​(T record)
      • close

        public void close()