KafkaAdminClient

KafkaAdminClient is the default and only known AdminClient that is used in Kafka administration utilities.

Tip

Enable ALL logging level for org.apache.kafka.clients.admin.KafkaAdminClient logger to see what happens inside.

Add the following line to config/log4j.properties:

log4j.logger.org.apache.kafka.clients.admin.KafkaAdminClient=ALL

Refer to Logging.

Creating KafkaAdminClient Instance

KafkaAdminClient takes the following to be created:

KafkaAdminClient initializes the internal properties.

Creating KafkaAdminClient Instance — createInternal Factory Method

KafkaAdminClient createInternal(
  AdminClientConfig config,
  TimeoutProcessorFactory timeoutProcessorFactory)

createInternal…​FIXME

Note
createInternal is used exclusively when AdminClient object is requested to create an AdminClient (for Kafka administration utilities).

Triggerring Preferred Replica Leader Election — electPreferredLeaders Method

ElectPreferredLeadersResult electPreferredLeaders(
  Collection<TopicPartition> partitions,
  ElectPreferredLeadersOptions options)
Note
electPreferredLeaders is part of the AdminClient Contract to trigger preferred replica leader election.

electPreferredLeaders creates a electPreferredLeaders call that simply uses ElectPreferredLeadersRequest.Builder to serialize partitions into a ElectPreferredLeadersRequest and, when a response comes in, requests the ElectPreferredLeadersRequest to deserialize it.

In the end, electPreferredLeaders requests the AdminClientRunnable to enqueue the electPreferredLeaders call.

describeTopics Method

DescribeTopicsResult describeTopics(
  Collection<String> topicNames,
  DescribeTopicsOptions options)

describeTopics…​FIXME

Note
describeTopics is used when…​FIXME

alterReplicaLogDirs Method

AlterReplicaLogDirsResult alterReplicaLogDirs(
  Map<TopicPartitionReplica, String> replicaAssignment,
  AlterReplicaLogDirsOptions options)

alterReplicaLogDirs…​FIXME

Note
alterReplicaLogDirs is used when…​FIXME

alterConfigs Method

AlterConfigsResult alterConfigs(
  Map<ConfigResource, Config> configs,
  AlterConfigsOptions options)
// Private API
Map<ConfigResource, KafkaFutureImpl<Void>> alterConfigs(
  Map<ConfigResource, Config> configs,
  AlterConfigsOptions options,
  Collection<ConfigResource> resources,
  NodeProvider nodeProvider)
Note
alterConfigs is part of the AdminClient Contract to…​FIXME.

alterConfigs…​FIXME

describeCluster Method

DescribeClusterResult describeCluster(
  DescribeClusterOptions options)
Note
describeCluster is part of the AdminClient Contract to…​FIXME.

describeCluster…​FIXME

deleteRecords Method

DeleteRecordsResult deleteRecords(
  Map<TopicPartition, RecordsToDelete> recordsToDelete,
  DeleteRecordsOptions options)
Note
deleteRecords is part of the AdminClient Contract to…​FIXME.

deleteRecords…​FIXME

listConsumerGroups Method

ListConsumerGroupsResult listConsumerGroups(
  ListConsumerGroupsOptions options)
Note
listConsumerGroups is part of the AdminClient Contract to…​FIXME.

listConsumerGroups…​FIXME

listTopics Method

ListTopicsResult listTopics(
  ListTopicsOptions options)
Note
listTopics is part of the AdminClient Contract to…​FIXME.

listTopics…​FIXME

describeConsumerGroups Method

DescribeConsumerGroupsResult describeConsumerGroups(
  Collection<String> groupIds,
  DescribeConsumerGroupsOptions options)
Note
describeConsumerGroups is part of the AdminClient Contract to…​FIXME.

describeConsumerGroups…​FIXME

listConsumerGroupOffsets Method

ListConsumerGroupOffsetsResult listConsumerGroupOffsets(
  String groupId,
  ListConsumerGroupOffsetsOptions options)
Note
listConsumerGroupOffsets is part of the AdminClient Contract to…​FIXME.

listConsumerGroupOffsets…​FIXME

deleteConsumerGroups Method

DeleteConsumerGroupsResult deleteConsumerGroups(
  Collection<String> groupIds,
  DeleteConsumerGroupsOptions options)
Note
deleteConsumerGroups is part of the AdminClient Contract to…​FIXME.

deleteConsumerGroups…​FIXME

createTopics Method

CreateTopicsResult createTopics(
  Collection<NewTopic> newTopics,
  CreateTopicsOptions options)
Note
createTopics is part of the AdminClient Contract to…​FIXME.

createTopics…​FIXME

deleteTopics Method

DeleteTopicsResult deleteTopics(
  Collection<String> topicNames,
  DeleteTopicsOptions options)
Note
deleteTopics is part of the AdminClient Contract to…​FIXME.

deleteTopics…​FIXME

createPartitions Method

CreatePartitionsResult createPartitions(
  Map<String, NewPartitions> newPartitions,
  CreatePartitionsOptions options)
Note
createPartitions is part of the AdminClient Contract to…​FIXME.

createPartitions…​FIXME

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

DescribeConfigsResult describeConfigs(
  Collection<ConfigResource> configResources,
  DescribeConfigsOptions options)
Note
describeConfigs is part of the AdminClient Contract to describe the configuration of the specified resources.

describeConfigs…​FIXME

Internal Properties

Name Description

runnable

Used to create the daemon KafkaThread

thread

Java’s Thread

Used when…​FIXME

results matching ""

    No results matching ""