Class PrintSinkFunction<IN>

  • Type Parameters:
    IN - Input record type
    All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.RichFunction, org.apache.flink.api.common.SupportsConcurrentExecutionAttempts, SinkFunction<IN>

    @PublicEvolving
    public class PrintSinkFunction<IN>
    extends RichSinkFunction<IN>
    implements org.apache.flink.api.common.SupportsConcurrentExecutionAttempts
    Implementation of the SinkFunction writing every tuple to the standard output or standard error stream.

    Four possible format options: sinkIdentifier:taskId> output <- sinkIdentifier provided, parallelism > 1 sinkIdentifier> output <- sinkIdentifier provided, parallelism == 1 taskId> output <- no sinkIdentifier provided, parallelism > 1 output <- no sinkIdentifier provided, parallelism == 1

    See Also:
    Serialized Form
    • Constructor Detail

      • PrintSinkFunction

        public PrintSinkFunction()
        Instantiates a print sink function that prints to standard out.
      • PrintSinkFunction

        public PrintSinkFunction​(boolean stdErr)
        Instantiates a print sink function that prints to standard out.
        Parameters:
        stdErr - True, if the format should print to standard error instead of standard out.
      • PrintSinkFunction

        public PrintSinkFunction​(String sinkIdentifier,
                                 boolean stdErr)
        Instantiates a print sink function that prints to standard out and gives a sink identifier.
        Parameters:
        stdErr - True, if the format should print to standard error instead of standard out.
        sinkIdentifier - Message that identify sink and is prefixed to the output of the value
    • Method Detail

      • open

        public void open​(org.apache.flink.configuration.Configuration parameters)
                  throws Exception
        Specified by:
        open in interface org.apache.flink.api.common.functions.RichFunction
        Overrides:
        open in class org.apache.flink.api.common.functions.AbstractRichFunction
        Throws:
        Exception