@PublicEvolving @Deprecated public static interface Sink.InitContext extends InitContext
SinkWriter
.INITIAL_CHECKPOINT_ID
Modifier and Type | Method and Description |
---|---|
SerializationSchema.InitializationContext |
asSerializationSchemaInitializationContext()
Deprecated.
Provides a view on this context as a
SerializationSchema.InitializationContext . |
<IN> TypeSerializer<IN> |
createInputSerializer()
Deprecated.
Creates a serializer for the type of sink's input.
|
MailboxExecutor |
getMailboxExecutor()
Deprecated.
Returns the mailbox executor that allows to execute
Runnable s inside the task
thread in between record processing. |
ProcessingTimeService |
getProcessingTimeService()
Deprecated.
Returns a
ProcessingTimeService that can be used to get the current time and
register timers. |
UserCodeClassLoader |
getUserCodeClassLoader()
Deprecated.
Gets the
UserCodeClassLoader to load classes that are not in system's classpath,
but are part of the jar file of a user job. |
boolean |
isObjectReuseEnabled()
Deprecated.
Returns whether object reuse has been enabled or disabled.
|
default <MetaT> Optional<Consumer<MetaT>> |
metadataConsumer()
Deprecated.
Returns a metadata consumer, the
SinkWriter can publish metadata events of type
MetaT to the consumer. |
SinkWriterMetricGroup |
metricGroup()
Deprecated.
|
getAttemptNumber, getJobId, getJobInfo, getNumberOfParallelSubtasks, getRestoredCheckpointId, getSubtaskId, getTaskInfo
UserCodeClassLoader getUserCodeClassLoader()
UserCodeClassLoader
to load classes that are not in system's classpath,
but are part of the jar file of a user job.UserCodeClassLoader
MailboxExecutor getMailboxExecutor()
Runnable
s 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 Runnable
per
batch to handle the result.
ProcessingTimeService getProcessingTimeService()
ProcessingTimeService
that can be used to get the current time and
register timers.SinkWriterMetricGroup metricGroup()
SerializationSchema.InitializationContext asSerializationSchemaInitializationContext()
SerializationSchema.InitializationContext
.boolean isObjectReuseEnabled()
<IN> TypeSerializer<IN> createInputSerializer()
@Experimental default <MetaT> Optional<Consumer<MetaT>> metadataConsumer()
SinkWriter
can publish metadata events of type
MetaT
to 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.
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.