@InterfaceStability.Evolving public class KafkaAdminClient extends AdminClient implements ConfluentAdmin
| Modifier and Type | Method and Description |
|---|---|
AlterConfigsResult |
alterConfigs(java.util.Map<ConfigResource,Config> configs,
AlterConfigsOptions options)
Deprecated.
|
AlterConsumerGroupOffsetsResult |
alterConsumerGroupOffsets(java.lang.String groupId,
java.util.Map<TopicPartition,OffsetAndMetadata> offsets,
AlterConsumerGroupOffsetsOptions options)
Alters offsets for the specified group.
|
AlterPartitionReassignmentsResult |
alterPartitionReassignments(java.util.Map<TopicPartition,java.util.Optional<NewPartitionReassignment>> reassignments,
AlterPartitionReassignmentsOptions options)
Change the reassignments for one or more partitions.
|
AlterReplicaLogDirsResult |
alterReplicaLogDirs(java.util.Map<TopicPartitionReplica,java.lang.String> replicaAssignment,
AlterReplicaLogDirsOptions options)
Change the log directory for the specified replicas.
|
void |
close(java.time.Duration timeout)
Close the Admin client 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.
|
CreateAclsResult |
createCentralizedAcls(java.util.Collection<AclBinding> acls,
CreateAclsOptions options,
java.lang.String clusterId,
int writerBrokerId)
Creates access control lists (ACLs) which are bound to specific resources.
|
CreateDelegationTokenResult |
createDelegationToken(CreateDelegationTokenOptions options)
Create a Delegation Token.
|
CreatePartitionsResult |
createPartitions(java.util.Map<java.lang.String,NewPartitions> newPartitions,
CreatePartitionsOptions options)
Increase the number of partitions of the topics given as the keys of
newPartitions
according to the corresponding values. |
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.
|
DeleteAclsResult |
deleteCentralizedAcls(java.util.Collection<AclBindingFilter> filters,
DeleteAclsOptions options,
java.lang.String clusterId,
int writerBrokerId)
Deletes access control lists (ACLs) according to the supplied filters.
|
DeleteConsumerGroupOffsetsResult |
deleteConsumerGroupOffsets(java.lang.String groupId,
java.util.Set<TopicPartition> partitions,
DeleteConsumerGroupOffsetsOptions options)
Delete committed offsets for a set of partitions in a consumer group.
|
DeleteConsumerGroupsResult |
deleteConsumerGroups(java.util.Collection<java.lang.String> groupIds,
DeleteConsumerGroupsOptions options)
Delete consumer groups from the cluster.
|
DeleteRecordsResult |
deleteRecords(java.util.Map<TopicPartition,RecordsToDelete> recordsToDelete,
DeleteRecordsOptions options)
Delete records whose offset is smaller than the given offset of the corresponding partition.
|
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.
|
DescribeConsumerGroupsResult |
describeConsumerGroups(java.util.Collection<java.lang.String> groupIds,
DescribeConsumerGroupsOptions options)
Describe some group IDs in the cluster.
|
DescribeDelegationTokenResult |
describeDelegationToken(DescribeDelegationTokenOptions options)
Describe the Delegation Tokens.
|
DescribeLogDirsResult |
describeLogDirs(java.util.Collection<java.lang.Integer> brokers,
DescribeLogDirsOptions options)
Query the information of all log directories on the given set of brokers
|
DescribeReplicaLogDirsResult |
describeReplicaLogDirs(java.util.Collection<TopicPartitionReplica> replicas,
DescribeReplicaLogDirsOptions options)
Query the replica log directory information for the specified replicas.
|
DescribeTopicsResult |
describeTopics(java.util.Collection<java.lang.String> topicNames,
DescribeTopicsOptions options)
Describe some topics in the cluster.
|
ElectLeadersResult |
electLeaders(ElectionType electionType,
java.util.Set<TopicPartition> topicPartitions,
ElectLeadersOptions options)
Elect a replica as leader for the given
partitions, or for all partitions if the argument
to partitions is null. |
ExpireDelegationTokenResult |
expireDelegationToken(byte[] hmac,
ExpireDelegationTokenOptions options)
Expire a Delegation Token.
|
AlterConfigsResult |
incrementalAlterConfigs(java.util.Map<ConfigResource,java.util.Collection<AlterConfigOp>> configs,
AlterConfigsOptions options)
Incrementally update the configuration for the specified resources.
|
ListConsumerGroupOffsetsResult |
listConsumerGroupOffsets(java.lang.String groupId,
ListConsumerGroupOffsetsOptions options)
List the consumer group offsets available in the cluster.
|
ListConsumerGroupsResult |
listConsumerGroups(ListConsumerGroupsOptions options)
List the consumer groups available in the cluster.
|
ListOffsetsResult |
listOffsets(java.util.Map<TopicPartition,OffsetSpec> topicPartitionOffsets,
ListOffsetsOptions options)
List offset for the specified partitions.
|
ListPartitionReassignmentsResult |
listPartitionReassignments(java.util.Optional<java.util.Set<TopicPartition>> partitions,
ListPartitionReassignmentsOptions options) |
ListTopicsResult |
listTopics(ListTopicsOptions options)
List the topics available in the cluster.
|
java.util.Map<MetricName,? extends Metric> |
metrics()
Get the metrics kept by the adminClient
|
RemoveMembersFromConsumerGroupResult |
removeMembersFromConsumerGroup(java.lang.String groupId,
RemoveMembersFromConsumerGroupOptions options)
Remove members from the consumer group by given member identities.
|
RenewDelegationTokenResult |
renewDelegationToken(byte[] hmac,
RenewDelegationTokenOptions options)
Renew a Delegation Token.
|
ReplicaStatusResult |
replicaStatus(java.util.Set<TopicPartition> partitions,
ReplicaStatusOptions options)
Retrieves the status of the replicas for a set of partitions, including observers.
|
create, createclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitalterConfigs, alterConsumerGroupOffsets, alterPartitionReassignments, alterReplicaLogDirs, close, close, create, create, createAcls, createDelegationToken, createPartitions, createTopics, deleteAcls, deleteConsumerGroupOffsets, deleteConsumerGroups, deleteRecords, deleteTopics, describeAcls, describeCluster, describeConfigs, describeConsumerGroups, describeDelegationToken, describeLogDirs, describeReplicaLogDirs, describeTopics, electLeaders, electPreferredLeaders, electPreferredLeaders, expireDelegationToken, incrementalAlterConfigs, listConsumerGroupOffsets, listConsumerGroups, listOffsets, listPartitionReassignments, listPartitionReassignments, listPartitionReassignments, listPartitionReassignments, listTopics, renewDelegationTokenpublic void close(java.time.Duration timeout)
Admin
The close operation has a grace period during which current operations will be allowed to
complete, specified by the given duration.
New operations will not be accepted during the grace period. Once the grace period is over,
all operations that have not yet been completed will be aborted with a TimeoutException.
public CreateTopicsResult createTopics(java.util.Collection<NewTopic> newTopics, CreateTopicsOptions options)
AdminThis operation is not transactional so it may succeed for some topics while fail for others.
It may take several seconds after CreateTopicsResult returns
success for all the brokers to become aware that the topics have been created.
During this time, Admin.listTopics() and Admin.describeTopics(Collection)
may not return information about the new topics.
This operation is supported by brokers with version 0.10.1.0 or higher. The validateOnly option is supported from version 0.10.2.0.
createTopics in interface AdminnewTopics - 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)
AdminThis operation is not transactional so it may succeed for some topics while fail for others.
It may take several seconds after the DeleteTopicsResult returns
success for all the brokers to become aware that the topics are gone.
During this time, Admin.listTopics() and Admin.describeTopics(Collection)
may continue to return information about the deleted topics.
If delete.topic.enable is false on the brokers, deleteTopics will mark the topics for deletion, but not actually delete them. The futures will return successfully in this case.
This operation is supported by brokers with version 0.10.1.0 or higher.
deleteTopics in interface AdmintopicNames - The topic names to delete.options - The options to use when deleting the topics.public ListTopicsResult listTopics(ListTopicsOptions options)
AdminlistTopics in interface Adminoptions - The options to use when listing the topics.public DescribeTopicsResult describeTopics(java.util.Collection<java.lang.String> topicNames, DescribeTopicsOptions options)
AdmindescribeTopics in interface AdmintopicNames - The names of the topics to describe.options - The options to use when describing the topic.public DescribeClusterResult describeCluster(DescribeClusterOptions options)
AdmindescribeCluster in interface Adminoptions - The options to use when getting information about the cluster.public DescribeAclsResult describeAcls(AclBindingFilter filter, DescribeAclsOptions options)
Admin
Note: it may take some time for changes made by createAcls or deleteAcls to be reflected
in the output of describeAcls.
This operation is supported by brokers with version 0.11.0.0 or higher.
describeAcls in interface Adminfilter - The filter to use.options - The options to use when listing the ACLs.public CreateAclsResult createAcls(java.util.Collection<AclBinding> acls, CreateAclsOptions options)
AdminThis operation is not transactional so it may succeed for some ACLs while fail for others.
If you attempt to add an ACL that duplicates an existing ACL, no error will be raised, but no changes will be made.
This operation is supported by brokers with version 0.11.0.0 or higher.
createAcls in interface Adminacls - The ACLs to createoptions - The options to use when creating the ACLs.@Confluent public CreateAclsResult createCentralizedAcls(java.util.Collection<AclBinding> acls, CreateAclsOptions options, java.lang.String clusterId, int writerBrokerId)
ConfluentAdminThis operation is not transactional so it may succeed for some ACLs while fail for others.
If you attempt to add an ACL that duplicates an existing ACL, no error will be raised, but no changes will be made.
This operation is supported by brokers with version 0.11.0.0 or higher.
createCentralizedAcls in interface ConfluentAdminacls - The ACLs to createoptions - The options to use when creating the ACLs.clusterId - Cluster id for which ACLs are being updatedwriterBrokerId - Broker id of the current centralized metadata master writerpublic DeleteAclsResult deleteAcls(java.util.Collection<AclBindingFilter> filters, DeleteAclsOptions options)
AdminThis operation is not transactional so it may succeed for some ACLs while fail for others.
This operation is supported by brokers with version 0.11.0.0 or higher.
deleteAcls in interface Adminfilters - The filters to use.options - The options to use when deleting the ACLs.@Confluent public DeleteAclsResult deleteCentralizedAcls(java.util.Collection<AclBindingFilter> filters, DeleteAclsOptions options, java.lang.String clusterId, int writerBrokerId)
ConfluentAdminThis operation is not transactional so it may succeed for some ACLs while fail for others.
This operation is supported by brokers with version 0.11.0.0 or higher.
deleteCentralizedAcls in interface ConfluentAdminfilters - The filters to use.options - The options to use when deleting the ACLs.clusterId - Cluster id for which ACLs are being updatedwriterBrokerId - Broker id of the current centralized metadata master writerpublic DescribeConfigsResult describeConfigs(java.util.Collection<ConfigResource> configResources, DescribeConfigsOptions options)
AdminThe returned configuration includes default values and the isDefault() method can be used to distinguish them from user supplied values.
The value of config entries where isSensitive() is true is always null 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 interface AdminconfigResources - The resources (topic and broker resource types are currently supported)options - The options to use when describing configs@Deprecated public AlterConfigsResult alterConfigs(java.util.Map<ConfigResource,Config> configs, AlterConfigsOptions options)
AdminUpdates are not transactional so they may succeed for some resources while fail for others. The configs for a particular resource are updated atomically.
This operation is supported by brokers with version 0.11.0.0 or higher.
alterConfigs in interface Adminconfigs - 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 configspublic AlterConfigsResult incrementalAlterConfigs(java.util.Map<ConfigResource,java.util.Collection<AlterConfigOp>> configs, AlterConfigsOptions options)
AdminUpdates are not transactional so they may succeed for some resources while fail for others. The configs for a particular resource are updated atomically.
The following exceptions can be anticipated when calling get() on the futures obtained from
the returned AlterConfigsResult:
ClusterAuthorizationException
if the authenticated user didn't have alter access to the cluster.TopicAuthorizationException
if the authenticated user didn't have alter access to the Topic.InvalidRequestException
if the request details are invalid. e.g., a configuration key was specified more than once for a resourceThis operation is supported by brokers with version 2.3.0 or higher.
incrementalAlterConfigs in interface Adminconfigs - The resources with their configsoptions - The options to use when altering configspublic AlterReplicaLogDirsResult alterReplicaLogDirs(java.util.Map<TopicPartitionReplica,java.lang.String> replicaAssignment, AlterReplicaLogDirsOptions options)
AdminAlterReplicaLogDirsResult instance.
This operation is not transactional so it may succeed for some replicas while fail for others.
This operation is supported by brokers with version 1.1.0 or higher.
alterReplicaLogDirs in interface AdminreplicaAssignment - The replicas with their log directory absolute pathoptions - The options to use when changing replica dirpublic DescribeLogDirsResult describeLogDirs(java.util.Collection<java.lang.Integer> brokers, DescribeLogDirsOptions options)
AdminThis operation is supported by brokers with version 1.0.0 or higher.
describeLogDirs in interface Adminbrokers - A list of brokersoptions - The options to use when querying log dir infopublic DescribeReplicaLogDirsResult describeReplicaLogDirs(java.util.Collection<TopicPartitionReplica> replicas, DescribeReplicaLogDirsOptions options)
AdminThis operation is supported by brokers with version 1.0.0 or higher.
describeReplicaLogDirs in interface Adminreplicas - The replicas to queryoptions - The options to use when querying replica log dir infopublic CreatePartitionsResult createPartitions(java.util.Map<java.lang.String,NewPartitions> newPartitions, CreatePartitionsOptions options)
AdminnewPartitions
according to the corresponding values. If partitions are increased for a topic that has a key,
the partition logic or ordering of the messages will be affected.
This operation is not transactional so it may succeed for some topics while fail for others.
It may take several seconds after this method returns
success for all the brokers to become aware that the partitions have been created.
During this time, Admin.describeTopics(Collection)
may not return information about the new partitions.
This operation is supported by brokers with version 1.0.0 or higher.
The following exceptions can be anticipated when calling get() on the futures obtained from the
values() method of the returned CreatePartitionsResult
AuthorizationException
if the authenticated user is not authorized to alter the topicTimeoutException
if the request was not completed in within the given AbstractOptions.timeoutMs().ReassignmentInProgressException
if a partition reassignment is currently in progressBrokerNotAvailableException
if the requested NewPartitions.assignments() contain a broker that is currently unavailable.InvalidReplicationFactorException
if no NewPartitions.assignments() are given and it is impossible for the broker to assign
replicas with the topics replication factor.KafkaException
if the request is invalid in some way.createPartitions in interface AdminnewPartitions - The topics which should have new partitions created, and corresponding parameters
for the created partitions.options - The options to use when creating the new partitions.public DeleteRecordsResult deleteRecords(java.util.Map<TopicPartition,RecordsToDelete> recordsToDelete, DeleteRecordsOptions options)
AdminThis operation is supported by brokers with version 0.11.0.0 or higher.
deleteRecords in interface AdminrecordsToDelete - The topic partitions and related offsets from which records deletion starts.options - The options to use when deleting records.public CreateDelegationTokenResult createDelegationToken(CreateDelegationTokenOptions options)
AdminThis operation is supported by brokers with version 1.1.0 or higher.
The following exceptions can be anticipated when calling get() on the futures obtained from the
delegationToken() method of the returned CreateDelegationTokenResult
UnsupportedByAuthenticationException
If the request sent on PLAINTEXT/1-way SSL channels or delegation token authenticated channels.InvalidPrincipalTypeException
if the renewers principal type is not supported.DelegationTokenDisabledException
if the delegation token feature is disabled.TimeoutException
if the request was not completed in within the given AbstractOptions.timeoutMs().createDelegationToken in interface Adminoptions - The options to use when creating delegation token.public RenewDelegationTokenResult renewDelegationToken(byte[] hmac, RenewDelegationTokenOptions options)
AdminThis operation is supported by brokers with version 1.1.0 or higher.
The following exceptions can be anticipated when calling get() on the futures obtained from the
expiryTimestamp() method of the returned RenewDelegationTokenResult
UnsupportedByAuthenticationException
If the request sent on PLAINTEXT/1-way SSL channels or delegation token authenticated channels.DelegationTokenDisabledException
if the delegation token feature is disabled.DelegationTokenNotFoundException
if the delegation token is not found on server.DelegationTokenOwnerMismatchException
if the authenticated user is not owner/renewer of the token.DelegationTokenExpiredException
if the delegation token is expired.TimeoutException
if the request was not completed in within the given AbstractOptions.timeoutMs().renewDelegationToken in interface Adminhmac - HMAC of the Delegation tokenoptions - The options to use when renewing delegation token.public ExpireDelegationTokenResult expireDelegationToken(byte[] hmac, ExpireDelegationTokenOptions options)
AdminThis operation is supported by brokers with version 1.1.0 or higher.
The following exceptions can be anticipated when calling get() on the futures obtained from the
expiryTimestamp() method of the returned ExpireDelegationTokenResult
UnsupportedByAuthenticationException
If the request sent on PLAINTEXT/1-way SSL channels or delegation token authenticated channels.DelegationTokenDisabledException
if the delegation token feature is disabled.DelegationTokenNotFoundException
if the delegation token is not found on server.DelegationTokenOwnerMismatchException
if the authenticated user is not owner/renewer of the requested token.DelegationTokenExpiredException
if the delegation token is expired.TimeoutException
if the request was not completed in within the given AbstractOptions.timeoutMs().expireDelegationToken in interface Adminhmac - HMAC of the Delegation tokenoptions - The options to use when expiring delegation token.public DescribeDelegationTokenResult describeDelegationToken(DescribeDelegationTokenOptions options)
AdminThis operation is supported by brokers with version 1.1.0 or higher.
The following exceptions can be anticipated when calling get() on the futures obtained from the
delegationTokens() method of the returned DescribeDelegationTokenResult
UnsupportedByAuthenticationException
If the request sent on PLAINTEXT/1-way SSL channels or delegation token authenticated channels.DelegationTokenDisabledException
if the delegation token feature is disabled.TimeoutException
if the request was not completed in within the given AbstractOptions.timeoutMs().describeDelegationToken in interface Adminoptions - The options to use when describing delegation tokens.public DescribeConsumerGroupsResult describeConsumerGroups(java.util.Collection<java.lang.String> groupIds, DescribeConsumerGroupsOptions options)
AdmindescribeConsumerGroups in interface AdmingroupIds - The IDs of the groups to describe.options - The options to use when describing the groups.public ListConsumerGroupsResult listConsumerGroups(ListConsumerGroupsOptions options)
AdminlistConsumerGroups in interface Adminoptions - The options to use when listing the consumer groups.public ListConsumerGroupOffsetsResult listConsumerGroupOffsets(java.lang.String groupId, ListConsumerGroupOffsetsOptions options)
AdminlistConsumerGroupOffsets in interface Adminoptions - The options to use when listing the consumer group offsets.public DeleteConsumerGroupsResult deleteConsumerGroups(java.util.Collection<java.lang.String> groupIds, DeleteConsumerGroupsOptions options)
AdmindeleteConsumerGroups in interface Adminoptions - The options to use when deleting a consumer group.public DeleteConsumerGroupOffsetsResult deleteConsumerGroupOffsets(java.lang.String groupId, java.util.Set<TopicPartition> partitions, DeleteConsumerGroupOffsetsOptions options)
AdmindeleteConsumerGroupOffsets in interface Adminoptions - The options to use when deleting offsets in a consumer group.public java.util.Map<MetricName,? extends Metric> metrics()
Adminpublic ElectLeadersResult electLeaders(ElectionType electionType, java.util.Set<TopicPartition> topicPartitions, ElectLeadersOptions options)
Adminpartitions, or for all partitions if the argument
to partitions is null.
This operation is not transactional so it may succeed for some partitions while fail for others.
It may take several seconds after this method returns success for all the brokers in the cluster
to become aware that the partitions have new leaders. During this time,
Admin.describeTopics(Collection) may not return information about the partitions'
new leaders.
This operation is supported by brokers with version 2.2.0 or later if preferred election is use; otherwise the brokers most be 2.4.0 or higher.
The following exceptions can be anticipated when calling get() on the future obtained
from the returned ElectLeadersResult:
ClusterAuthorizationException
if the authenticated user didn't have alter access to the cluster.UnknownTopicOrPartitionException
if the topic or partition did not exist within the cluster.InvalidTopicException
if the topic was already queued for deletion.NotControllerException
if the request was sent to a broker that was not the controller for the cluster.TimeoutException
if the request timed out before the election was complete.LeaderNotAvailableException
if the preferred leader was not alive or not in the ISR.electLeaders in interface AdminelectionType - The type of election to conduct.topicPartitions - The topics and partitions for which to conduct elections.options - The options to use when electing the leaders.public AlterPartitionReassignmentsResult alterPartitionReassignments(java.util.Map<TopicPartition,java.util.Optional<NewPartitionReassignment>> reassignments, AlterPartitionReassignmentsOptions options)
AdminOptional.empty()) will The following exceptions can be anticipated when calling get() on the futures obtained from
the returned AlterPartitionReassignmentsResult:
ClusterAuthorizationException
If the authenticated user didn't have alter access to the cluster.UnknownTopicOrPartitionException
If the topic or partition does not exist within the cluster.TimeoutException
if the request timed out before the controller could record the new assignments.InvalidReplicaAssignmentException
If the specified assignment was not valid.NoReassignmentInProgressException
If there was an attempt to cancel a reassignment for a partition which was not being reassigned.alterPartitionReassignments in interface Adminreassignments - The reassignments to add, modify, or remove. See NewPartitionReassignment.options - The options to use.public ListPartitionReassignmentsResult listPartitionReassignments(java.util.Optional<java.util.Set<TopicPartition>> partitions, ListPartitionReassignmentsOptions options)
listPartitionReassignments in interface Adminpartitions - the partitions we want to get reassignment for, or an empty optional if we want to get the reassignments for all partitions in the clusteroptions - The options to use.@Confluent public ReplicaStatusResult replicaStatus(java.util.Set<TopicPartition> partitions, ReplicaStatusOptions options)
ConfluentAdminThe status of the replicas will be as witnessed by the partition leader. That is, the replicas themselves may be further in progress than what's provided, however the leader has not yet processed that state update.
The following exceptions can be anticipated when calling get() on the futures obtained from
the returned ReplicaStatusResult:
TopicAuthorizationException
If the authenticated user didn't have describe access to the Topic.UnknownTopicOrPartitionException
If a given topic or partition does not exist.NotLeaderForPartitionException
If the partition leader changed while the request was outstanding.TimeoutException
If the request timed out before the controller could retrieve the partition's replica status.replicaStatus in interface ConfluentAdminpartitions - The partitions to retrieve replica status for.options - The options to use.public RemoveMembersFromConsumerGroupResult removeMembersFromConsumerGroup(java.lang.String groupId, RemoveMembersFromConsumerGroupOptions options)
Admin
For possible error codes, refer to LeaveGroupResponse.
removeMembersFromConsumerGroup in interface AdmingroupId - The ID of the group to remove member from.options - The options to carry removing members' information.public AlterConsumerGroupOffsetsResult alterConsumerGroupOffsets(java.lang.String groupId, java.util.Map<TopicPartition,OffsetAndMetadata> offsets, AlterConsumerGroupOffsetsOptions options)
AdminAlters offsets for the specified group. In order to succeed, the group must be empty.
This operation is not transactional so it may succeed for some partitions while fail for others.
alterConsumerGroupOffsets in interface AdmingroupId - The group for which to alter offsets.offsets - A map of offsets by partition with associated metadata. Partitions not specified in the map are ignored.options - The options to use when altering the offsets.public ListOffsetsResult listOffsets(java.util.Map<TopicPartition,OffsetSpec> topicPartitionOffsets, ListOffsetsOptions options)
AdminList offset for the specified partitions. This operation enables to find the beginning offset, end offset as well as the offset matching a timestamp in partitions.
listOffsets in interface AdmintopicPartitionOffsets - The mapping from partition to the OffsetSpec to look up.options - The options to use when retrieving the offsets