writeToKafkaWithTimestamps
for the producer are also deprecated.@Deprecated public static class FlinkKafkaProducer010.FlinkKafkaProducer010Configuration<T> extends DataStreamSink<T>
This is only kept because it's part of the public API. It is not necessary anymore, now
that the SinkFunction
interface provides timestamps.
To enable the settings, this fake sink must override all the public methods
in DataStreamSink
.
Modifier and Type | Method and Description |
---|---|
DataStreamSink<T> |
disableChaining()
Deprecated.
Turns off chaining for this operator so thread co-location will not be
used as an optimization.
|
SinkTransformation<T> |
getTransformation()
Deprecated.
Returns the transformation that contains the actual sink operator of this sink.
|
DataStreamSink<T> |
name(String name)
Deprecated.
Sets the name of this sink.
|
void |
setFlushOnCheckpoint(boolean flush)
Deprecated.
If set to true, the Flink producer will wait for all outstanding messages in the Kafka buffers
to be acknowledged by the Kafka producer on a checkpoint.
|
void |
setLogFailuresOnly(boolean logFailuresOnly)
Deprecated.
Defines whether the producer should fail on errors, or only log them.
|
DataStreamSink<T> |
setParallelism(int parallelism)
Deprecated.
Sets the parallelism for this sink.
|
DataStreamSink<T> |
setUidHash(String uidHash)
Deprecated.
Sets an user provided hash for this operator.
|
void |
setWriteTimestampToKafka(boolean writeTimestampToKafka)
Deprecated.
If set to true, Flink will write the (event time) timestamp attached to each record into Kafka.
|
DataStreamSink<T> |
slotSharingGroup(String slotSharingGroup)
Deprecated.
Sets the slot sharing group of this operation.
|
DataStreamSink<T> |
uid(String uid)
Deprecated.
Sets an ID for this operator.
|
public void setLogFailuresOnly(boolean logFailuresOnly)
logFailuresOnly
- The flag to indicate logging-only on exceptions.public void setFlushOnCheckpoint(boolean flush)
flush
- Flag indicating the flushing mode (true = flush on checkpoint)public void setWriteTimestampToKafka(boolean writeTimestampToKafka)
writeTimestampToKafka
- Flag indicating if Flink's internal timestamps are written to Kafka.public SinkTransformation<T> getTransformation()
DataStreamSink
getTransformation
in class DataStreamSink<T>
public DataStreamSink<T> name(String name)
DataStreamSink
name
in class DataStreamSink<T>
public DataStreamSink<T> uid(String uid)
DataStreamSink
The specified ID is used to assign the same operator ID across job submissions (for example when starting a job from a savepoint).
Important: this ID needs to be unique per transformation and job. Otherwise, job submission will fail.
uid
in class DataStreamSink<T>
uid
- The unique user-specified ID of this transformation.public DataStreamSink<T> setUidHash(String uidHash)
DataStreamSink
The user provided hash is an alternative to the generated hashes, that is considered when identifying an operator through the default hash mechanics fails (e.g. because of changes between Flink versions).
Important: this should be used as a workaround or for trouble shooting. The provided hash needs to be unique per transformation and job. Otherwise, job submission will fail. Furthermore, you cannot assign user-specified hash to intermediate nodes in an operator chain and trying so will let your job fail.
A use case for this is in migration between Flink versions or changing the jobs in a way that changes the automatically generated hashes. In this case, providing the previous hashes directly through this method (e.g. obtained from old logs) can help to reestablish a lost mapping from states to their target operator.
setUidHash
in class DataStreamSink<T>
uidHash
- The user provided hash for this operator. This will become the JobVertexID, which is shown in the
logs and web ui.public DataStreamSink<T> setParallelism(int parallelism)
DataStreamSink
setParallelism
in class DataStreamSink<T>
parallelism
- The parallelism for this sink.public DataStreamSink<T> disableChaining()
DataStreamSink
Chaining can be turned off for the whole
job by StreamExecutionEnvironment.disableOperatorChaining()
however it is not advised for performance considerations.
disableChaining
in class DataStreamSink<T>
public DataStreamSink<T> slotSharingGroup(String slotSharingGroup)
DataStreamSink
Operations inherit the slot sharing group of input operations if all input operations are in the same slot sharing group and no slot sharing group was explicitly specified.
Initially an operation is in the default slot sharing group. An operation can be put into
the default group explicitly by setting the slot sharing group to "default"
.
slotSharingGroup
in class DataStreamSink<T>
slotSharingGroup
- The slot sharing group name.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.