Skip to content

Latest commit

 

History

History
83 lines (56 loc) · 2.85 KB

kafka-server-ReplicaFetcherManager.adoc

File metadata and controls

83 lines (56 loc) · 2.85 KB

ReplicaFetcherManager

ReplicaFetcherManager is a manager of ReplicaFetcherThreads for ReplicaManager.

ReplicaFetcherManager
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
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