Class TransactionalIdsGenerator
java.lang.Object
org.apache.flink.streaming.connectors.kafka.internals.TransactionalIdsGenerator
Deprecated.
Class responsible for generating transactional ids to use when communicating with Kafka.
It guarantees that:
- generated ids to use will never clash with ids to use from different subtasks
- generated ids to abort will never clash with ids to abort from different subtasks
- generated ids to use will never clash with ids to abort from different subtasks
In other words, any particular generated id will always be assigned to one and only one subtask.
-
Constructor Summary
ConstructorsConstructorDescriptionTransactionalIdsGenerator(String prefix, int subtaskIndex, int totalNumberOfSubtasks, int poolSize, int safeScaleDownFactor) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.If we have to abort previous transactional id in case of restart after a failure BEFORE first checkpoint completed, we don't know what was the parallelism used in previous attempt.generateIdsToUse(long nextFreeTransactionalId) Deprecated.Range of available transactional ids to use is: [nextFreeTransactionalId, nextFreeTransactionalId + parallelism * kafkaProducersPoolSize) loop below picks in a deterministic way a subrange of those available transactional ids based on index of this subtask.
-
Constructor Details
-
TransactionalIdsGenerator
public TransactionalIdsGenerator(String prefix, int subtaskIndex, int totalNumberOfSubtasks, int poolSize, int safeScaleDownFactor) Deprecated.
-
-
Method Details
-
generateIdsToUse
Deprecated.Range of available transactional ids to use is: [nextFreeTransactionalId, nextFreeTransactionalId + parallelism * kafkaProducersPoolSize) loop below picks in a deterministic way a subrange of those available transactional ids based on index of this subtask. -
generateIdsToAbort
Deprecated.If we have to abort previous transactional id in case of restart after a failure BEFORE first checkpoint completed, we don't know what was the parallelism used in previous attempt. In that case we must guess the ids range to abort based on current configured pool size, current parallelism and safeScaleDownFactor.
-