Interface Sink.InitContext
-
- All Superinterfaces:
InitContext
- All Known Implementing Classes:
Sink.InitContextWrapper
@PublicEvolving @Deprecated public static interface Sink.InitContext extends InitContext
Deprecated.The interface exposes some runtime info for creating aSinkWriter.
-
-
Field Summary
-
Fields inherited from interface org.apache.flink.api.connector.sink2.InitContext
INITIAL_CHECKPOINT_ID
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description SerializationSchema.InitializationContextasSerializationSchemaInitializationContext()Deprecated.Provides a view on this context as aSerializationSchema.InitializationContext.<IN> TypeSerializer<IN>createInputSerializer()Deprecated.Creates a serializer for the type of sink's input.MailboxExecutorgetMailboxExecutor()Deprecated.Returns the mailbox executor that allows to executeRunnables inside the task thread in between record processing.ProcessingTimeServicegetProcessingTimeService()Deprecated.Returns aProcessingTimeServicethat can be used to get the current time and register timers.UserCodeClassLoadergetUserCodeClassLoader()Deprecated.Gets theUserCodeClassLoaderto load classes that are not in system's classpath, but are part of the jar file of a user job.booleanisObjectReuseEnabled()Deprecated.Returns whether object reuse has been enabled or disabled.default <MetaT> Optional<java.util.function.Consumer<MetaT>>metadataConsumer()Deprecated.Returns a metadata consumer, theSinkWritercan publish metadata events of typeSink.InitContextto the consumer.org.apache.flink.metrics.groups.SinkWriterMetricGroupmetricGroup()Deprecated.-
Methods inherited from interface org.apache.flink.api.connector.sink2.InitContext
getAttemptNumber, getJobId, getJobInfo, getNumberOfParallelSubtasks, getRestoredCheckpointId, getSubtaskId, getTaskInfo
-
-
-
-
Method Detail
-
getUserCodeClassLoader
UserCodeClassLoader getUserCodeClassLoader()
Deprecated.Gets theUserCodeClassLoaderto load classes that are not in system's classpath, but are part of the jar file of a user job.- See Also:
UserCodeClassLoader
-
getMailboxExecutor
MailboxExecutor getMailboxExecutor()
Deprecated.Returns the mailbox executor that allows to executeRunnables inside the task thread in between record processing.Note that this method should not be used per-record for performance reasons in the same way as records should not be sent to the external system individually. Rather, implementers are expected to batch records and only enqueue a single
Runnableper batch to handle the result.
-
getProcessingTimeService
ProcessingTimeService getProcessingTimeService()
Deprecated.Returns aProcessingTimeServicethat can be used to get the current time and register timers.
-
metricGroup
org.apache.flink.metrics.groups.SinkWriterMetricGroup metricGroup()
Deprecated.- Returns:
- The metric group this writer belongs to.
-
asSerializationSchemaInitializationContext
SerializationSchema.InitializationContext asSerializationSchemaInitializationContext()
Deprecated.Provides a view on this context as aSerializationSchema.InitializationContext.
-
isObjectReuseEnabled
boolean isObjectReuseEnabled()
Deprecated.Returns whether object reuse has been enabled or disabled.
-
createInputSerializer
<IN> TypeSerializer<IN> createInputSerializer()
Deprecated.Creates a serializer for the type of sink's input.
-
metadataConsumer
@Experimental default <MetaT> Optional<java.util.function.Consumer<MetaT>> metadataConsumer()
Deprecated.Returns a metadata consumer, theSinkWritercan publish metadata events of typeSink.InitContextto the consumer.It is recommended to use a separate thread pool to publish the metadata because enqueuing a lot of these messages in the mailbox may lead to a performance decrease. thread, and the
Consumer.accept(T)method is executed very fast.
-
-