Skip to content

Latest commit

 

History

History
199 lines (138 loc) · 5.75 KB

kafka-server-AdminManager.adoc

File metadata and controls

199 lines (138 loc) · 5.75 KB

AdminManager

AdminManager is the administration interface of KafkaServer.

AdminManager is created exclusively when KafkaServer is started.

AdminManager
Figure 1. AdminManager

AdminManager uses the MetadataCache for the following:

AdminManager uses [Admin Manager on Broker [brokerId]] as the logging prefix (aka logIdent).

Tip

Enable ALL logging levels for kafka.server.AdminManager logger to see what happens inside.

Add the following line to config/log4j.properties:

log4j.logger.kafka.server.AdminManager=ALL

Refer to Logging.

Creating AdminManager Instance

AdminManager takes the following when created:

AdminManager initializes the internal registries and counters.

Creating Topics — createTopics Method

createTopics(
  timeout: Int,
  validateOnly: Boolean,
  createInfo: Map[String, CreateTopicsRequest.TopicDetails],
  responseCallback: (Map[String, ApiError]) => Unit): Unit

createTopics…​FIXME

Note
createTopics is used exclusively when KafkaApis is requested to handle a CREATE_TOPICS request.

Describing Configuration Of Specified Resources (Topics and Brokers) — describeConfigs Method

describeConfigs(
  resourceToConfigNames: Map[ConfigResource, Option[Set[String]]],
  includeSynonyms: Boolean): Map[ConfigResource, DescribeConfigsResponse.Config]

For TOPIC resources, describeConfigs does the following:

  1. Requests the AdminZkClient to fetch configuration of the given topics (from Zookeeper)

  2. Uses KafkaServer utility to create the default log properties based on the KafkaConfig

  3. Uses LogConfig utility to fromProps with the default log properties and the topic configuration (from Zookeeper)

For BROKER resources, describeConfigs does the following…​FIXME

Note
describeConfigs is used exclusively when KafkaApis is requested to handle a DescribeConfigs request.

alterConfigs Method

alterConfigs(
  configs: Map[ConfigResource, AlterConfigsRequest.Config],
  validateOnly: Boolean): Map[ConfigResource, ApiError]

alterConfigs…​FIXME

Note
alterConfigs is used exclusively when KafkaApis is requested to handleAlterConfigsRequest.

configSynonyms Internal Method

configSynonyms(
  name: String,
  synonyms: List[String],
  isSensitive: Boolean): List[DescribeConfigsResponse.ConfigSynonym]

configSynonyms…​FIXME

Note
configSynonyms is used when…​FIXME

createPartitions Method

createPartitions(
  timeout: Int,
  newPartitions: Map[String, PartitionDetails],
  validateOnly: Boolean,
  listenerName: ListenerName,
  callback: Map[String, ApiError] => Unit): Unit

createPartitions…​FIXME

Note
createPartitions is used when…​FIXME

tryCompleteDelayedTopicOperations Method

tryCompleteDelayedTopicOperations(topic: String): Unit

tryCompleteDelayedTopicOperations…​FIXME

Note
tryCompleteDelayedTopicOperations is used when…​FIXME

incrementalAlterConfigs Method

incrementalAlterConfigs(
  configs: Map[ConfigResource,
  List[AlterConfigOp]],
  validateOnly: Boolean): Map[ConfigResource, ApiError]

incrementalAlterConfigs…​FIXME

Note
incrementalAlterConfigs is used when…​FIXME

createTopicConfigEntry Internal Method

createTopicConfigEntry(
  logConfig: LogConfig,
  topicProps: Properties,
  includeSynonyms: Boolean)(
    name: String,
    value: Any): DescribeConfigsResponse.ConfigEntry

createTopicConfigEntry…​FIXME

Note
createTopicConfigEntry is used when AdminManager is requested to describe the configuration of a topic and create topics.

createBrokerConfigEntry Internal Method

createBrokerConfigEntry(
  perBrokerConfig: Boolean,
  includeSynonyms: Boolean)(
    name: String,
    value: Any): DescribeConfigsResponse.ConfigEntry

createBrokerConfigEntry…​FIXME

Note
createBrokerConfigEntry is used when AdminManager is requested to…​FIXME

Internal Properties

Name Description

adminZkClient

alterConfigPolicy

createTopicPolicy

topicPurgatory