@InterfaceStability.Evolving public class KafkaAdminClient extends AdminClient
AdminClient. An instance of this class is created by invoking one of the
create() methods in AdminClient. Users should not refer to this class directly.
The API of this class is evolving, see AdminClient for details.| Modifier and Type | Method and Description |
|---|---|
AlterConfigsResult |
alterConfigs(java.util.Map<ConfigResource,Config> configs,
AlterConfigsOptions options)
Update the configuration for the specified resources with the default options.
|
void |
close(long duration,
java.util.concurrent.TimeUnit unit)
Close the AdminClient and release all associated resources.
|
CreateAclsResult |
createAcls(java.util.Collection<AclBinding> acls,
CreateAclsOptions options)
Creates access control lists (ACLs) which are bound to specific resources.
|
CreateTopicsResult |
createTopics(java.util.Collection<NewTopic> newTopics,
CreateTopicsOptions options)
Create a batch of new topics.
|
DeleteAclsResult |
deleteAcls(java.util.Collection<AclBindingFilter> filters,
DeleteAclsOptions options)
Deletes access control lists (ACLs) according to the supplied filters.
|
DeleteTopicsResult |
deleteTopics(java.util.Collection<java.lang.String> topicNames,
DeleteTopicsOptions options)
Delete a batch of topics.
|
DescribeAclsResult |
describeAcls(AclBindingFilter filter,
DescribeAclsOptions options)
Lists access control lists (ACLs) according to the supplied filter.
|
DescribeClusterResult |
describeCluster(DescribeClusterOptions options)
Get information about the nodes in the cluster.
|
DescribeConfigsResult |
describeConfigs(java.util.Collection<ConfigResource> configResources,
DescribeConfigsOptions options)
Get the configuration for the specified resources.
|
DescribeTopicsResult |
describeTopics(java.util.Collection<java.lang.String> topicNames,
DescribeTopicsOptions options)
Describe some topics in the cluster.
|
ListTopicsResult |
listTopics(ListTopicsOptions options)
List the topics available in the cluster.
|
alterConfigs, close, create, create, createAcls, createTopics, deleteAcls, deleteTopics, describeAcls, describeCluster, describeConfigs, describeTopics, listTopicspublic void close(long duration,
java.util.concurrent.TimeUnit unit)
AdminClientclose in class AdminClientduration - The duration to use for the wait time.unit - The time unit to use for the wait time.public CreateTopicsResult createTopics(java.util.Collection<NewTopic> newTopics, CreateTopicsOptions options)
AdminClientcreateTopics in class AdminClientnewTopics - The new topics to create.options - The options to use when creating the new topics.public DeleteTopicsResult deleteTopics(java.util.Collection<java.lang.String> topicNames, DeleteTopicsOptions options)
AdminClientdeleteTopics in class AdminClienttopicNames - The topic names to delete.options - The options to use when deleting the topics.public ListTopicsResult listTopics(ListTopicsOptions options)
AdminClientlistTopics in class AdminClientoptions - The options to use when listing the topics.public DescribeTopicsResult describeTopics(java.util.Collection<java.lang.String> topicNames, DescribeTopicsOptions options)
AdminClientdescribeTopics in class AdminClienttopicNames - The names of the topics to describe.options - The options to use when describing the topic.public DescribeClusterResult describeCluster(DescribeClusterOptions options)
AdminClientdescribeCluster in class AdminClientoptions - The options to use when getting information about the cluster.public DescribeAclsResult describeAcls(AclBindingFilter filter, DescribeAclsOptions options)
AdminClientdescribeAcls in class AdminClientfilter - The filter to use.options - The options to use when listing the ACLs.public CreateAclsResult createAcls(java.util.Collection<AclBinding> acls, CreateAclsOptions options)
AdminClientcreateAcls in class AdminClientacls - The ACLs to createoptions - The options to use when creating the ACLs.public DeleteAclsResult deleteAcls(java.util.Collection<AclBindingFilter> filters, DeleteAclsOptions options)
AdminClientdeleteAcls in class AdminClientfilters - The filters to use.options - The options to use when deleting the ACLs.public DescribeConfigsResult describeConfigs(java.util.Collection<ConfigResource> configResources, DescribeConfigsOptions options)
AdminClientnull so that sensitive information
is not disclosed.
Config entries where isReadOnly() is true cannot be updated.
This operation is supported by brokers with version 0.11.0.0 or higher.describeConfigs in class AdminClientconfigResources - The resources (topic and broker resource types are currently supported)options - The options to use when describing configspublic AlterConfigsResult alterConfigs(java.util.Map<ConfigResource,Config> configs, AlterConfigsOptions options)
AdminClientalterConfigs in class AdminClientconfigs - The resources with their configs (topic is the only resource type with configs that can
be updated currently)options - The options to use when describing configs