public class FlinkOffsetBackingStore extends Object implements org.apache.kafka.connect.storage.OffsetBackingStore
OffsetBackingStore backed on Flink's state mechanism.
The OFFSET_STATE_VALUE in the WorkerConfig is the raw position and offset
data in JSON format. It is set into the config when recovery from failover by DebeziumSourceFunction before startup the DebeziumEngine. If it is not a restoration,
the OFFSET_STATE_VALUE is empty. DebeziumEngine relies on the OffsetBackingStore for failover recovery.
DebeziumSourceFunction| Modifier and Type | Field and Description |
|---|---|
protected Map<ByteBuffer,ByteBuffer> |
data |
protected ExecutorService |
executor |
static int |
FLUSH_TIMEOUT_SECONDS |
static String |
OFFSET_STATE_VALUE |
| Constructor and Description |
|---|
FlinkOffsetBackingStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.kafka.connect.runtime.WorkerConfig config) |
Future<Map<ByteBuffer,ByteBuffer>> |
get(Collection<ByteBuffer> keys) |
Future<Void> |
set(Map<ByteBuffer,ByteBuffer> values,
org.apache.kafka.connect.util.Callback<Void> callback) |
void |
start() |
void |
stop() |
public static final String OFFSET_STATE_VALUE
public static final int FLUSH_TIMEOUT_SECONDS
protected Map<ByteBuffer,ByteBuffer> data
protected ExecutorService executor
public void configure(org.apache.kafka.connect.runtime.WorkerConfig config)
configure in interface org.apache.kafka.connect.storage.OffsetBackingStorepublic void start()
start in interface org.apache.kafka.connect.storage.OffsetBackingStorepublic void stop()
stop in interface org.apache.kafka.connect.storage.OffsetBackingStorepublic Future<Map<ByteBuffer,ByteBuffer>> get(Collection<ByteBuffer> keys)
get in interface org.apache.kafka.connect.storage.OffsetBackingStorepublic Future<Void> set(Map<ByteBuffer,ByteBuffer> values, org.apache.kafka.connect.util.Callback<Void> callback)
set in interface org.apache.kafka.connect.storage.OffsetBackingStoreCopyright © 2022 The Apache Software Foundation. All rights reserved.