Admin
is the abstraction of administrative clients for managing and inspecting resources of a Kafka cluster (e.g. topics, brokers, configurations, ACLs).
Note
|
AdminClient is the only known direct extension of the Admin Contract in Apache Kafka. |
Method | Description |
---|---|
|
AlterPartitionReassignmentsResult alterPartitionReassignments(
Map<TopicPartition, Optional<NewPartitionReassignment>> reassignments) // (1)
AlterPartitionReassignmentsResult alterPartitionReassignments(
Map<TopicPartition, Optional<NewPartitionReassignment>> reassignments,
AlterPartitionReassignmentsOptions options)
|
|
AlterReplicaLogDirsResult alterReplicaLogDirs(
Map<TopicPartitionReplica, String> replicaAssignment) // (1)
AlterReplicaLogDirsResult alterReplicaLogDirs(
Map<TopicPartitionReplica, String> replicaAssignment,
AlterReplicaLogDirsOptions options)
|
|
void close() // (1)
void close(
Duration timeout)
|
|
Admin create(
Map<String, Object> conf)
Admin create(
Properties props) |
|
CreateAclsResult createAcls(
Collection<AclBinding> acls) // (1)
CreateAclsResult createAcls(
Collection<AclBinding> acls,
CreateAclsOptions options)
|
|
CreateDelegationTokenResult createDelegationToken() // (1)
CreateDelegationTokenResult createDelegationToken(
CreateDelegationTokenOptions options)
|
|
CreatePartitionsResult createPartitions(
Map<String, NewPartitions> newPartitions) // (1)
CreatePartitionsResult createPartitions(
Map<String, NewPartitions> newPartitions,
CreatePartitionsOptions options)
|
|
CreateTopicsResult createTopics(
Collection<NewTopic> newTopics) // (1)
CreateTopicsResult createTopics(
Collection<NewTopic> newTopics,
CreateTopicsOptions options)
|
|
DeleteAclsResult deleteAcls(
Collection<AclBindingFilter> filters) // (1)
DeleteAclsResult deleteAcls(
Collection<AclBindingFilter> filters,
DeleteAclsOptions options)
|
|
DeleteConsumerGroupOffsetsResult deleteConsumerGroupOffsets(
String groupId,
Set<TopicPartition> partitions) // (1)
DeleteConsumerGroupOffsetsResult deleteConsumerGroupOffsets(
String groupId,
Set<TopicPartition> partitions,
DeleteConsumerGroupOffsetsOptions options)
|
|
DeleteConsumerGroupsResult deleteConsumerGroups(
Collection<String> groupIds) // (1)
DeleteConsumerGroupsResult deleteConsumerGroups(
Collection<String> groupIds,
DeleteConsumerGroupsOptions options)
|
|
DeleteRecordsResult deleteRecords(
Map<TopicPartition, RecordsToDelete> recordsToDelete) // (1)
DeleteRecordsResult deleteRecords(
Map<TopicPartition, RecordsToDelete> recordsToDelete,
DeleteRecordsOptions options)
|
|
DeleteTopicsResult deleteTopics(
Collection<String> topics) // (1)
DeleteTopicsResult deleteTopics(
Collection<String> topics,
DeleteTopicsOptions options)
|
|
DescribeAclsResult describeAcls(
AclBindingFilter filter) // (1)
DescribeAclsResult describeAcls(
AclBindingFilter filter,
DescribeAclsOptions options)
|
|
DescribeClusterResult describeCluster() // (1)
DescribeClusterResult describeCluster(
DescribeClusterOptions options)
|
|
DescribeConfigsResult describeConfigs(
Collection<ConfigResource> resources) // (1)
DescribeConfigsResult describeConfigs(
Collection<ConfigResource> resources,
DescribeConfigsOptions options)
|
|
DescribeConsumerGroupsResult describeConsumerGroups(
Collection<String> groupIds) // (1)
DescribeConsumerGroupsResult describeConsumerGroups(
Collection<String> groupIds,
DescribeConsumerGroupsOptions options)
|
|
DescribeDelegationTokenResult describeDelegationToken() // (1)
DescribeDelegationTokenResult describeDelegationToken(
DescribeDelegationTokenOptions options)
|
|
DescribeLogDirsResult describeLogDirs(
Collection<Integer> brokers) // (1)
DescribeLogDirsResult describeLogDirs(
Collection<Integer> brokers,
DescribeLogDirsOptions options)
|
|
DescribeReplicaLogDirsResult describeReplicaLogDirs(
Collection<TopicPartitionReplica> replicas) // (1)
DescribeReplicaLogDirsResult describeReplicaLogDirs(
Collection<TopicPartitionReplica> replicas,
DescribeReplicaLogDirsOptions options)
|
|
DescribeTopicsResult describeTopics(
Collection<String> topicNames) // (1)
DescribeTopicsResult describeTopics(
Collection<String> topicNames,
DescribeTopicsOptions options)
|
|
ElectLeadersResult electLeaders(
ElectionType electionType,
Set<TopicPartition> partitions) // (1)
ElectLeadersResult electLeaders(
ElectionType electionType,
Set<TopicPartition> partitions,
ElectLeadersOptions options)
Elects a replica as the leader for the given topic partitions Used for kafka-leader-election.sh utility (via LeaderElectionCommand) |
|
ExpireDelegationTokenResult expireDelegationToken(
byte[] hmac) // (1)
ExpireDelegationTokenResult expireDelegationToken(
byte[] hmac,
ExpireDelegationTokenOptions options)
|
|
AlterConfigsResult incrementalAlterConfigs(
Map<ConfigResource, Collection<AlterConfigOp>> configs) // (1)
AlterConfigsResult incrementalAlterConfigs(
Map<ConfigResource, Collection<AlterConfigOp>> configs,
AlterConfigsOptions options)
|
|
ListConsumerGroupOffsetsResult listConsumerGroupOffsets(
String groupId) // (1)
ListConsumerGroupOffsetsResult listConsumerGroupOffsets(
String groupId,
ListConsumerGroupOffsetsOptions options)
Used for ConsumerGroupCommand (when executed with --offsets option) |
|
ListConsumerGroupsResult listConsumerGroups() // (1)
ListConsumerGroupsResult listConsumerGroups(
ListConsumerGroupsOptions options)
Used for ConsumerGroupCommand (when executed with --list option) |
|
ListPartitionReassignmentsResult listPartitionReassignments() // (1)
ListPartitionReassignmentsResult listPartitionReassignments(
ListPartitionReassignmentsOptions options)
ListPartitionReassignmentsResult listPartitionReassignments(
Set<TopicPartition> partitions)
ListPartitionReassignmentsResult listPartitionReassignments(
Set<TopicPartition> partitions,
ListPartitionReassignmentsOptions options)
ListPartitionReassignmentsResult listPartitionReassignments(
Optional<Set<TopicPartition>> partitions,
ListPartitionReassignmentsOptions options)
|
|
ListTopicsResult listTopics() // (1)
ListTopicsResult listTopics(
ListTopicsOptions options)
|
|
Map<MetricName, ? extends Metric> metrics() Used for |
|
RemoveMembersFromConsumerGroupResult removeMembersFromConsumerGroup(
String groupId,
RemoveMembersFromConsumerGroupOptions options) Removes members from the consumer group by given member identities |
|
RenewDelegationTokenResult renewDelegationToken(
byte[] hmac) // (1)
RenewDelegationTokenResult renewDelegationToken(
byte[] hmac,
RenewDelegationTokenOptions options)
|