earliestOrLatestOffset(topicPartition: TopicPartition, earliestOrLatest: Long): Long
ReplicaFetcherThread
ReplicaFetcherThread is an uninterruptible AbstractFetcherThread that…FIXME
ReplicaFetcherThread is used (managed) by ReplicaFetcherManager.
ReplicaFetcherThread is created when ReplicaFetcherManager is requested to create a fetcher thread (when…FIXME).
ReplicaFetcherThread uses replica.fetch.backoff.ms configuration property for the fetchBackOffMs.
ReplicaFetcherThread uses replica.fetch.max.bytes configuration property for…FIXME
Creating ReplicaFetcherThread Instance
ReplicaFetcherThread takes the following to be created:
ReplicaFetcherThread initializes the internal properties.
earliestOrLatestOffset Internal Method
earliestOrLatestOffset…FIXME
|
Note
|
earliestOrLatestOffset is used when…FIXME
|
fetchEpochsFromLeader Method
fetchEpochsFromLeader(partitions: Map[TopicPartition, Int]): Map[TopicPartition, EpochEndOffset]
|
Note
|
fetchEpochsFromLeader is a part of AbstractFetcherThread Contract.
|
fetchEpochsFromLeader…FIXME
processPartitionData Method
processPartitionData(
topicPartition: TopicPartition,
fetchOffset: Long,
partitionData: FetchData): Option[LogAppendInfo]
|
Note
|
processPartitionData is part of the AbstractFetcherThread Contract to…FIXME.
|
processPartitionData…FIXME
truncate Method
truncate(
tp: TopicPartition,
offsetTruncationState: OffsetTruncationState): Unit
|
Note
|
truncate is a part of AbstractFetcherThread Contract.
|
truncate…FIXME
truncateFullyAndStartAt Method
truncateFullyAndStartAt(topicPartition: TopicPartition, offset: Long): Unit
|
Note
|
truncateFullyAndStartAt is a part of AbstractFetcherThread Contract.
|
truncateFullyAndStartAt…FIXME
latestEpoch Method
latestEpoch(topicPartition: TopicPartition): Option[Int]
|
Note
|
latestEpoch is a part of AbstractFetcherThread Contract to get the latest (current) leader epoch for the given TopicPartition.
|
latestEpoch requests the ReplicaManager for the local partition replica (or throw an exception) for the given TopicPartition and requests the replica for the latest (current) leader epoch.
isOffsetForLeaderEpochSupported Method
isOffsetForLeaderEpochSupported: Boolean
|
Note
|
isOffsetForLeaderEpochSupported is part of the AbstractFetcherThread Contract to control whether a OffsetsForLeaderEpochRequest is supported (that was added in Kafka 0.11.0.0).
|
isOffsetForLeaderEpochSupported simply returns the brokerSupportsLeaderEpochRequest flag.
buildFetch Method
buildFetch(
partitionMap: Map[TopicPartition, PartitionFetchState]
): ResultWithPartitions[Option[FetchRequest.Builder]]
|
Note
|
buildFetch is part of the AbstractFetcherThread Contract to…FIXME
|
buildFetch requests the FetchSessionHandler for a new Builder.
For every TopicPartition (in the given partitionMap), buildFetch finds the logStartOffset of the local log (using the ReplicaManager) and adds them as PartitionData to the Builder.
buildFetch requests the Builder to create a FetchRequestData.
In the end, buildFetch creates a FetchRequest.Builder for the local partition replica.
Internal Properties
| Name | Description |
|---|---|
|
Flag that says whether the inter.broker.protocol.version is Used in isOffsetForLeaderEpochSupported |
|
|