public interface SinkTaskContext
Modifier and Type | Method and Description |
---|---|
java.util.Set<TopicPartition> |
assignment()
Get the current set of assigned TopicPartitions for this task.
|
void |
offset(java.util.Map<TopicPartition,java.lang.Long> offsets)
Reset the consumer offsets for the given topic partitions.
|
void |
offset(TopicPartition tp,
long offset)
Reset the consumer offsets for the given topic partition.
|
void |
pause(TopicPartition... partitions)
Pause consumption of messages from the specified TopicPartitions.
|
void |
requestCommit()
Request an offset commit.
|
void |
resume(TopicPartition... partitions)
Resume consumption of messages from previously paused TopicPartitions.
|
void |
timeout(long timeoutMs)
Set the timeout in milliseconds.
|
void offset(java.util.Map<TopicPartition,java.lang.Long> offsets)
offsets
- map of offsets for topic partitionsvoid offset(TopicPartition tp, long offset)
tp
- the topic partition to reset offset.offset
- the offset to reset to.void timeout(long timeoutMs)
timeoutMs
- the backoff timeout in milliseconds.java.util.Set<TopicPartition> assignment()
void pause(TopicPartition... partitions)
partitions
- the partitions which should be pausedvoid resume(TopicPartition... partitions)
partitions
- the partitions to resumevoid requestCommit()