Class TransactionalIdFactory
- java.lang.Object
-
- org.apache.flink.connector.kafka.sink.internal.TransactionalIdFactory
-
@Internal public class TransactionalIdFactory extends Object
Utility class for constructing transactionalIds for Kafka transactions.
-
-
Constructor Summary
Constructors Constructor Description TransactionalIdFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringbuildTransactionalId(String transactionalIdPrefix, int subtaskId, long checkpointOffset)Constructs a transactionalId with the following formattransactionalIdPrefix-subtaskId-checkpointOffset.static StringextractPrefix(String name)static intextractSubtaskId(String name)
-
-
-
Method Detail
-
buildTransactionalId
public static String buildTransactionalId(String transactionalIdPrefix, int subtaskId, long checkpointOffset)
Constructs a transactionalId with the following formattransactionalIdPrefix-subtaskId-checkpointOffset.- Parameters:
transactionalIdPrefix- prefix for the idsubtaskId- describing the subtask which is opening the transactioncheckpointOffset- an always incrementing number usually capturing the number of checkpoints taken by the subtask- Returns:
- transactionalId
-
extractSubtaskId
public static int extractSubtaskId(String name)
-
-