public class TierTopicConsumerForRestore extends Object implements Runnable
Constructor and Description |
---|
TierTopicConsumerForRestore(Map<Integer,Long> lastMaterializedOffsetTierTopicPartition,
Set<TopicIdPartition> partitionsToRestore,
Supplier<org.apache.kafka.clients.consumer.Consumer<byte[],byte[]>> consumerSupplier) |
TierTopicConsumerForRestore(String brokerConnectionString,
Map<Integer,Long> lastMaterializedOffsetTierTopicPartition,
Set<TopicIdPartition> partitionsToRestore) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
org.apache.kafka.clients.consumer.Consumer<byte[],byte[]> |
consumer() |
void |
doWork() |
Queue<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]>> |
getRecords(TopicIdPartition tpid)
Retrieves the buffered records that have been read so far from the consumer.
|
void |
initialize() |
void |
run() |
void |
shutdown() |
void |
start() |
public TierTopicConsumerForRestore(Map<Integer,Long> lastMaterializedOffsetTierTopicPartition, Set<TopicIdPartition> partitionsToRestore, Supplier<org.apache.kafka.clients.consumer.Consumer<byte[],byte[]>> consumerSupplier)
public void initialize()
public void start()
public void shutdown()
public void cleanup()
public void doWork()
public org.apache.kafka.clients.consumer.Consumer<byte[],byte[]> consumer()
public Queue<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]>> getRecords(TopicIdPartition tpid)
tpid
- the TopicIdPartition for which we want to retrieve tier topic events