ReplicaFetcherManager

ReplicaFetcherManager is a manager of ReplicaFetcherThreads for ReplicaManager.

ReplicaFetcherManager.png
Figure 1. ReplicaFetcherManager

ReplicaFetcherManager uses num.replica.fetchers configuration property for the number of replica fetcher threads.

Tip

Enable ALL logging level for kafka.server.ReplicaFetcherManager logger to see what happens inside.

Add the following line to config/log4j.properties:

log4j.logger.kafka.server.ReplicaFetcherManager=ALL

Refer to Logging.

Performance Metrics

As an AbstractFetcherManager, ReplicaFetcherManager is a KafkaMetricsGroup.

The performance metrics are registered in kafka.server:type=ReplicaFetcherManager group.

ReplicaFetcherManager jconsole.png
Figure 2. ReplicaFetcherManager in jconsole

Creating ReplicaFetcherManager Instance

ReplicaFetcherManager takes the following to be created:

Creating ReplicaFetcherThread — createFetcherThread Method

createFetcherThread(
  fetcherId: Int,
  sourceBroker: BrokerEndPoint): ReplicaFetcherThread
Note
createFetcherThread is part of the AbstractFetcherManager contract to…​FIXME.

createFetcherThread creates a ReplicaFetcherThread with the thread name (that uses the threadNamePrefix if defined, the given fetcherId and the id of the BrokerEndPoint) as follows:

[prefix]ReplicaFetcherThread-[fetcherId]-[sourceBrokerId]

shutdown Method

shutdown(): Unit

shutdown prints out the following INFO message to the logs:

shutting down

shutdown closeAllFetchers.

In the end, shutdown prints out the following INFO message to the logs:

shutdown completed
Note
shutdown is used when…​FIXME

results matching ""

    No results matching ""