/** * List the consumer group offsets available in the cluster with the default options. * * This is a convenience method for #{@link AdminClient#listConsumerGroupOffsets(String, ListConsumerGroupOffsetsOptions)} with default options. * * @return The ListGroupOffsetsResult. */ public ListConsumerGroupOffsetsResult listConsumerGroupOffsets(String groupId) { return listConsumerGroupOffsets(groupId, new ListConsumerGroupOffsetsOptions()); }
/** * This is a convenience method for #{@link AdminClient#createAcls(Collection, CreateAclsOptions)} with * default options. See the overload for more details. * * This operation is supported by brokers with version 0.11.0.0 or higher. * * @param acls The ACLs to create * @return The CreateAclsResult. */ public CreateAclsResult createAcls(Collection<AclBinding> acls) { return createAcls(acls, new CreateAclsOptions()); }
/** * This is a convenience method for #{@link AdminClient#deleteAcls(Collection, DeleteAclsOptions)} with default options. * See the overload for more details. * * This operation is supported by brokers with version 0.11.0.0 or higher. * * @param filters The filters to use. * @return The DeleteAclsResult. */ public DeleteAclsResult deleteAcls(Collection<AclBindingFilter> filters) { return deleteAcls(filters, new DeleteAclsOptions()); }
/** * List the topics available in the cluster with the default options. * * This is a convenience method for #{@link AdminClient#listTopics(ListTopicsOptions)} with default options. * See the overload for more details. * * @return The ListTopicsResult. */ public ListTopicsResult listTopics() { return listTopics(new ListTopicsOptions()); }
/** * Describe some topics in the cluster, with the default options. * * This is a convenience method for #{@link AdminClient#describeTopics(Collection, DescribeTopicsOptions)} with * default options. See the overload for more details. * * @param topicNames The names of the topics to describe. * * @return The DescribeTopicsResult. */ public DescribeTopicsResult describeTopics(Collection<String> topicNames) { return describeTopics(topicNames, new DescribeTopicsOptions()); }
/** * Get information about the nodes in the cluster, using the default options. * * This is a convenience method for #{@link AdminClient#describeCluster(DescribeClusterOptions)} with default options. * See the overload for more details. * * @return The DescribeClusterResult. */ public DescribeClusterResult describeCluster() { return describeCluster(new DescribeClusterOptions()); }
/** * This is a convenience method for #{@link AdminClient#deleteTopics(Collection, DeleteTopicsOptions)} * with default options. See the overload for more details. * * This operation is supported by brokers with version 0.10.1.0 or higher. * * @param topics The topic names to delete. * @return The DeleteTopicsResult. */ public DeleteTopicsResult deleteTopics(Collection<String> topics) { return deleteTopics(topics, new DeleteTopicsOptions()); }
/** * Describe some group IDs in the cluster, with the default options. * <p> * This is a convenience method for * #{@link AdminClient#describeConsumerGroups(Collection, DescribeConsumerGroupsOptions)} with * default options. See the overload for more details. * * @param groupIds The IDs of the groups to describe. * @return The DescribeConsumerGroupResult. */ public DescribeConsumerGroupsResult describeConsumerGroups(Collection<String> groupIds) { return describeConsumerGroups(groupIds, new DescribeConsumerGroupsOptions()); }
/** * List the consumer groups available in the cluster with the default options. * * This is a convenience method for #{@link AdminClient#listConsumerGroups(ListConsumerGroupsOptions)} with default options. * See the overload for more details. * * @return The ListGroupsResult. */ public ListConsumerGroupsResult listConsumerGroups() { return listConsumerGroups(new ListConsumerGroupsOptions()); }
/** * Get the configuration for the specified resources with the default options. * * This is a convenience method for #{@link AdminClient#describeConfigs(Collection, DescribeConfigsOptions)} with default options. * See the overload for more details. * * This operation is supported by brokers with version 0.11.0.0 or higher. * * @param resources The resources (topic and broker resource types are currently supported) * @return The DescribeConfigsResult */ public DescribeConfigsResult describeConfigs(Collection<ConfigResource> resources) { return describeConfigs(resources, new DescribeConfigsOptions()); }
/** * Delete consumer groups from the cluster with the default options. * * @return The DeleteConsumerGroupResult. */ public DeleteConsumerGroupsResult deleteConsumerGroups(Collection<String> groupIds) { return deleteConsumerGroups(groupIds, new DeleteConsumerGroupsOptions()); }
/** * Create a new AdminClient with the given configuration. * * @param props The configuration. * @return The new KafkaAdminClient. */ public static AdminClient create(Properties props) { return KafkaAdminClient.createInternal(new AdminClientConfig(props, true), null); }
boolean callHasExpired(KafkaAdminClient.Call call) { if ((!call.isInternal()) && shouldInjectFailure()) { log.debug("Injecting timeout for {}.", call); return true; } else { boolean ret = super.callHasExpired(call); log.debug("callHasExpired({}) = {}", call, ret); return ret; } } }
/** * This is a convenience method for #{@link AdminClient#describeAcls(AclBindingFilter, DescribeAclsOptions)} with * default options. See the overload for more details. * * This operation is supported by brokers with version 0.11.0.0 or higher. * * @param filter The filter to use. * @return The DeleteAclsResult. */ public DescribeAclsResult describeAcls(AclBindingFilter filter) { return describeAcls(filter, new DescribeAclsOptions()); }
private static AdminClientConfig newConfMap(String... vals) { return new AdminClientConfig(newStrMap(vals)); }
/** * <p>Create a Delegation Token.</p> * * <p>This is a convenience method for {@link #createDelegationToken(CreateDelegationTokenOptions)} with default options. * See the overload for more details.</p> * * @return The CreateDelegationTokenResult. */ public CreateDelegationTokenResult createDelegationToken() { return createDelegationToken(new CreateDelegationTokenOptions()); }
/** *<p>Describe the Delegation Tokens.</p> * * <p>This is a convenience method for {@link #describeDelegationToken(DescribeDelegationTokenOptions)} with default options. * This will return all the user owned tokens and tokens where user have Describe permission. See the overload for more details.</p> * * @return The DescribeDelegationTokenResult. */ public DescribeDelegationTokenResult describeDelegationToken() { return describeDelegationToken(new DescribeDelegationTokenOptions()); }
/** * <p>Expire a Delegation Token.</p> * * <p>This is a convenience method for {@link #expireDelegationToken(byte[], ExpireDelegationTokenOptions)} with default options. * This will expire the token immediately. See the overload for more details.</p> * * @param hmac HMAC of the Delegation token * @return The ExpireDelegationTokenResult. */ public ExpireDelegationTokenResult expireDelegationToken(byte[] hmac) { return expireDelegationToken(hmac, new ExpireDelegationTokenOptions()); }
/** * <p>Renew a Delegation Token.</p> * * <p>This is a convenience method for {@link #renewDelegationToken(byte[], RenewDelegationTokenOptions)} with default options. * See the overload for more details.</p> * * * @param hmac HMAC of the Delegation token * @return The RenewDelegationTokenResult. */ public RenewDelegationTokenResult renewDelegationToken(byte[] hmac) { return renewDelegationToken(hmac, new RenewDelegationTokenOptions()); }
/** * Create a new AdminClient with the given configuration. * * @param conf The configuration. * @return The new KafkaAdminClient. */ public static AdminClient create(Map<String, Object> conf) { return KafkaAdminClient.createInternal(new AdminClientConfig(conf, true), null); }