Class PrintSinkFunction<IN>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.streaming.api.functions.sink.RichSinkFunction<IN>
-
- org.apache.flink.streaming.api.functions.sink.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>
@Deprecated @PublicEvolving public class PrintSinkFunction<IN> extends RichSinkFunction<IN> implements org.apache.flink.api.common.SupportsConcurrentExecutionAttempts
Deprecated.This interface will be removed in future versions. Use the newPrintSinkinterface instead.Implementation of the SinkFunction writing every tuple to the standard output or standard error stream.Four possible format options:
sinkIdentifier:taskId> output <-sinkIdentifierprovided, parallelism > 1sinkIdentifier> output <-sinkIdentifierprovided, parallelism == 1 taskId> output <- nosinkIdentifierprovided, parallelism > 1 output <- nosinkIdentifierprovided, parallelism == 1- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.streaming.api.functions.sink.SinkFunction
SinkFunction.Context
-
-
Constructor Summary
Constructors Constructor Description PrintSinkFunction()Deprecated.Instantiates a print sink function that prints to standard out.PrintSinkFunction(boolean stdErr)Deprecated.Instantiates a print sink function that prints to standard out.PrintSinkFunction(String sinkIdentifier, boolean stdErr)Deprecated.Instantiates a print sink function that prints to standard out and gives a sink identifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidinvoke(IN record)Deprecated.voidopen(org.apache.flink.configuration.Configuration parameters)Deprecated.This method is deprecated since Flink 1.19.StringtoString()Deprecated.-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.streaming.api.functions.sink.SinkFunction
finish, invoke, writeWatermark
-
-
-
-
Constructor Detail
-
PrintSinkFunction
public PrintSinkFunction()
Deprecated.Instantiates a print sink function that prints to standard out.
-
PrintSinkFunction
public PrintSinkFunction(boolean stdErr)
Deprecated.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)
Deprecated.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
@Deprecated public void open(org.apache.flink.configuration.Configuration parameters) throws Exception
Deprecated.This method is deprecated since Flink 1.19. The users are recommended to implementopen(OpenContext openContext)and overrideopen(Configuration parameters)with an empty body instead. 1. If you implementopen(OpenContext openContext), theopen(OpenContext openContext)will be invoked and theopen(Configuration parameters)won't be invoked. 2. If you don't implementopen(OpenContext openContext), theopen(Configuration parameters)will be invoked in the default implementation of theopen(OpenContext openContext).Initialization method for thePrintSinkFunction.- Specified by:
openin interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
openin classorg.apache.flink.api.common.functions.AbstractRichFunction- Parameters:
parameters- The configuration containing the parameters attached to the contract.- Throws:
Exception- if an error happens.- See Also:
- FLIP-344: Remove parameter in RichFunction#open
-
invoke
public void invoke(IN record)
Deprecated.- Specified by:
invokein interfaceSinkFunction<IN>
-
-