Class OutputTag<T>

  • Type Parameters:
    T - the type of elements in the side-output stream.
    All Implemented Interfaces:
    Serializable

    @PublicEvolving
    public class OutputTag<T>
    extends Object
    implements Serializable
    An OutputTag is a typed and named tag to use for tagging side outputs of an operator.

    An OutputTag must always be an anonymous inner class so that Flink can derive a TypeInformation for the generic type parameter.

    Example:

    
     OutputTag<Tuple2<String, Long>> info = new OutputTag<Tuple2<String, Long>>("late-data"){};
     
    See Also:
    Serialized Form
    • Constructor Detail

      • OutputTag

        public OutputTag​(String id)
        Creates a new named OutputTag with the given id.
        Parameters:
        id - The id of the created OutputTag.
      • OutputTag

        public OutputTag​(String id,
                         TypeInformation<T> typeInfo)
        Creates a new named OutputTag with the given id and output TypeInformation.
        Parameters:
        id - The id of the created OutputTag.
        typeInfo - The TypeInformation for the side output.