ReplicaFetcherThread

ReplicaFetcherThread is an uninterruptible AbstractFetcherThread that…​FIXME

ReplicaFetcherThread is used (managed) exclusively by ReplicaFetcherManager.

ReplicaFetcherThread uses replica.fetch.backoff.ms configuration property for the fetchBackOffMs.

ReplicaFetcherThread is created exclusively when ReplicaFetcherManager is requested to create a fetcher thread (when…​FIXME).

Table 1. ReplicaFetcherThread’s Internal Properties (e.g. Registries, Counters and Flags)
Name Description

brokerSupportsLeaderEpochRequest

Flag that says whether the inter.broker.protocol.version is 0.11.0-IV2 or above

Used exclusively in isOffsetForLeaderEpochSupported

Creating ReplicaFetcherThread Instance

ReplicaFetcherThread takes the following when created:

ReplicaFetcherThread initializes the internal registries and counters.

earliestOrLatestOffset Internal Method

earliestOrLatestOffset(topicPartition: TopicPartition, earliestOrLatest: Long): Long

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…​FIXME

results matching ""

    No results matching ""