public class TierRecordsIterator
extends org.apache.kafka.common.utils.AbstractIterator<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]>>
ConsumerRecord<byte[], byte[]>
) from a
list of Tier Topic Snapshots that are being downloaded. Rather than eagerly awaiting all downloads to complete,
this iterator lazily awaits a download only once a file is needed; this is because there could be potentially
thousands of Tier Topic Snapshots (totaling several gigabytes) and we want to be able to use the earlier Tier
Topic Snapshots before the later ones have finished downloading.Constructor and Description |
---|
TierRecordsIterator(List<Future<Path>> snapshotPathFutures)
Construct TierRecordsIterator over tier topic snapshot files that are being downloaded to the given paths.
|
Modifier and Type | Method and Description |
---|---|
Map<Integer,Long> |
tierPartitionStartOffsets() |
hasNext, next, peek, remove
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public TierRecordsIterator(List<Future<Path>> snapshotPathFutures)
Assumes that the given list of filenames are correctly sorted in increasing order such that no events will be missed if these events are to be directly appended to the relevant Tier Partition State.
snapshotPathFutures
- Paths to which the snapshots are being downloaded