...
Consumer groups and share groups exist in the same namespace in a Kafka cluster. As a result, if there’s a consumer group with a particular name, you cannot create a share group with the same name, and vice versa. But consumer groups and share groups are quite different in terms of use, so attempts to perform operations for one kind of group on a group of the incorrect type will fail with a GroupIdNotFoundException
. The new AdminClient.listGroups
method gives a way of listing groups of all types.
Because consumer groups and share groups are both created automatically on first use, the type of group that is created depends upon how the group ID was first used. For production use, choosing a naming convention for groups in advance and using this configuration to enforce the group type is recommended.
A future KIP is planned for the administration of groups, encompassing aspects such as administrative creation of groups, and listing groups of all types including consumer groups, share groups and others such as groups used by Kafka Connect.
Share group membership
This KIP builds upon the new consumer group protocol in KIP-848: The Next Generation of the Consumer Rebalance Protocol.
...
Method signature | Description |
---|
AlterShareGroupOffsetsResult alterShareGroupOffsets(String groupId, Map<TopicPartition, Long> offsets) | Alter offset information for a share group. |
AlterShareGroupOffsetsResult alterShareGroupOffsets(String groupId, Map<TopicPartition, Long> offsets, AlterShareGroupOffsetsOptions options) | Alter offset information for a share group. |
DeleteShareGroupOffsetsResult deleteShareGroupOffsets(String groupId, Set<String> topics) | Delete offset information for a set of topics in a share group. |
DeleteShareGroupOffsetsResult deleteShareGroupOffsets(String groupId, Set<String> topics, DeleteShareGroupOffsetsOptions options) | Delete offset information for a set of topics in a share group. |
DeleteShareGroupResult deleteShareGroups(Collection<String> groupIds) | Delete share groups from the cluster. |
DeleteShareGroupResult deleteShareGroups(Collection<String> groupIds, DeleteShareGroupOptions options) | Delete share groups from the cluster. |
DescribeShareGroupsResult describeShareGroups(Collection<String> groupIds) | Describe some share groups in the cluster. |
DescribeShareGroupsResult describeShareGroups(Collection<String> groupIds, DescribeShareGroupsOptions options) | Describe some share groups in the cluster. |
ListShareGroupOffsetsResult listShareGroupOffsets(Map<String, ListShareGroupOffsetsSpec> groupSpecs) | List the share group offsets available in the cluster for the specified share groups. |
ListShareGroupOffsetsResult listShareGroupOffsets(Map<String, ListShareGroupOffsetsSpec> groupSpecs, ListShareGroupOffsetsOptions options) | List the share group offsets available in the cluster for the specified share groups. |
ListShareGroupsResult listShareGroups() | List the share groups available in the cluster. |
ListShareGroupsResult listShareGroups(ListShareGroupsOptions options) | List the share groups available in the cluster. | ListGroupsResult listGroups() | List the groups available in the cluster. |
ListGroupsResult listGroups(ListGroupsOptions options) | List the groups available in the cluster. |
The equivalence between the consumer group and share group interfaces is clear. There are some differences:
...
Code Block |
---|
|
/**
* Alters offsets for the specified group. In order to succeed, the group must be empty.
*
* <p>This is a convenience method for {@link #alterShareGroupOffsets(String, Map, AlterShareGroupOffsetsOptions)} with default options.
* See the overload for more details.
*
* @param groupId The group for which to alter offsets.
* @param offsets A map of offsets by partition.
* @return The AlterShareGroupOffsetsResult.
*/
default AlterShareGroupOffsetsResult alterShareGroupOffsets(String groupId, Map<TopicPartition, Long> offsets) {
return alterShareGroupOffsets(groupId, offsets, new AlterShareGroupOffsetsOptions());
}
/**
* Alters offsets for the specified group. In order to succeed, the group must be empty.
*
* <p>This operation is not transactional so it may succeed for some partitions while fail for others.
*
* @param groupId The group for which to alter offsets.
* @param offsets A map of offsets by partition. Partitions not specified in the map are ignored.
* @param options The options to use when altering the offsets.
* @return The AlterShareGroupOffsetsResult.
*/
AlterShareGroupOffsetsResult alterShareGroupOffsets(String groupId, Map<TopicPartition, Long> offsets, AlterShareGroupOffsetsOptions options);
/**
* Delete offsets for a set of topics in a share group with the default options.
*
* <p>This is a convenience method for {@link #deleteShareGroupOffsets(String, Set, DeleteShareGroupOffsetsOptions)} with default options.
* See the overload for more details.
*
* @param groupId The group for which to delete offsets.
* @param topics The topics.
* @return The DeleteShareGroupOffsetsResult.
*/
default DeleteShareGroupOffsetsResult deleteShareGroupOffsets(String groupId, Set<String> topics) {
return deleteShareGroupOffsets(groupId, topics, new DeleteShareGroupOffsetsOptions());
}
/**
* Delete offsets for a set of topics in a share group.
*
* @param groupId The group for which to delete offsets.
* @param topics The topics.
* @param options The options to use when deleting offsets in a share group.
* @return The DeleteShareGroupOffsetsResult.
*/
DeleteShareGroupOffsetsResult deleteShareGroupOffsets(String groupId,
Set<String> topics,
DeleteShareGroupOffsetsOptions options);
/**
* Delete share groups from the cluster with the default options.
*
* <p>This is a convenience method for {@link #deleteShareGroups(Collection<String>, DeleteShareGroupsOptions)} with default options.
* See the overload for more details.
*
* @param groupIds The IDs of the groups to delete.
* @return The DeleteShareGroupsResult.
*/
default DeleteShareGroupsResult deleteShareGroups(Collection<String> groupIds) {
return deleteShareGroups(groupIds, new DeleteShareGroupsOptions());
}
/**
* Delete share groups from the cluster.
*
* @param groupIds The IDs of the groups to delete.
* @param options The options to use when deleting a share group.
* @return The DeleteShareGroupsResult.
*/
DeleteShareGroupsResult deleteShareGroups(Collection<String> groupIds, DeleteShareGroupsOptions options);
/**
* Describe some share groups in the cluster, with the default options.
*
* <p>This is a convenience method for {@link #describeShareGroups(Collection, DescribeShareGroupsOptions)}
* with default options. See the overload for more details.
*
* @param groupIds The IDs of the groups to describe.
* @return The DescribeShareGroupsResult.
*/
default DescribeShareGroupsResult describeShareGroups(Collection<String> groupIds) {
return describeShareGroups(groupIds, new DescribeShareGroupsOptions());
}
/**
* Describe some share groups in the cluster.
*
* @param groupIds The IDs of the groups to describe.
* @param options The options to use when describing the groups.
* @return The DescribeShareGroupsResult.
*/
DescribeShareGroupsResult describeShareGroups(Collection<String> groupIds,
DescribeShareGroupsOptions options);
/**
* List the share group offsets available in the cluster for the specified share groups with the default options.
*
* <p>This is a convenience method for {@link #listShareGroupOffsets(Map, ListShareGroupOffsetsOptions)}
* to list offsets of all partitions for the specified share groups with default options.
*
* @param groupSpecs Map of share group ids to a spec that specifies the topic partitions of the group to list offsets for.
* @return The ListShareGroupOffsetsResult
*/
default ListShareGroupOffsetsResult listShareGroupOffsets(Map<String, ListShareGroupOffsetsSpec> groupSpecs) {
return listShareGroupOffsets(groupSpecs, new ListShareGroupOffsetsOptions());
}
/**
* List the share group offsets available in the cluster for the specified share groups.
*
* @param groupSpecs Map of share group ids to a spec that specifies the topic partitions of the group to list offsets for.
* @param options The options to use when listing the share group offsets.
* @return The ListShareGroupOffsetsResult
*/
ListShareGroupOffsetsResult listShareGroupOffsets(Map<String, ListShareGroupOffsetsSpec> groupSpecs, ListShareGroupOffsetsOptions options);
/**
* List the share groups available in the cluster with the default options.
*
* <p>This is a convenience method for {@link #listShareGroups(ListShareGroupsOptions)} with default options.
* See the overload for more details.
*
* @return The ListShareGroupsResult.
*/
default ListShareGroupsResult listShareGroups() {
return listShareGroups(new ListShareGroupsOptions());
}
/**
* List the share groups available in the cluster.
*
* @param options The options to use when listing the share groups.
* @return The ListShareGroupsResult.
*/
ListShareGroupsResult listShareGroups(ListShareGroupsOptions options);
|
AlterShareGroupOffsetsResult
Code Block |
---|
|
package org.apache.kafka.clients.admin;
/**
* The result * Listof the groups available in the cluster with the default options.
*
* <p>This is a convenience method for {@link #listGroups(ListGroupsOptions)} with default options.
* See the overload for more details.
*
* @return The ListGroupsResult{@link Admin#alterShareGroupOffsets(String groupId, Map<TopicPartition, Long>), AlterShareGroupOffsetsOptions)} call.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class AlterShareGroupOffsetsResult {
/**
* Return a future which succeeds if all the alter offsets succeed.
*/
defaultpublic ListGroupsResultKafkaFuture<Void> listGroupsall() {
}
/**
return listGroups(new ListGroupsOptions());
* Return a }
future which can /**
* List the groups available in the cluster.be used to check the result for a given partition.
*/
*
* @param options The options to use when listing the groups.
* @return The ListGroupsResult.
*/
ListGroupsResult listGroups(ListGroupsOptions); |
...
public KafkaFuture<Void> partitionResult(final TopicPartition partition) {
}
} |
AlterShareGroupOffsetsOptions
Code Block |
---|
|
package org.apache.kafka.client.admin;
/**
* Options for the {@link Admin#alterShareGroupOffsets(String groupId, Map<TopicPartition, Long>), AlterShareGroupOffsetsOptions)} call.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class AlterShareGroupOffsetsOptions extends AbstractOptions<AlterShareGroupOffsetsOptions> {
} |
DeleteShareGroupOffsetsResult
Code Block |
---|
|
package org.apache.kafka.clients.admin;
/**
* The result of the {@link Admin#alterShareGroupOffsetsAdmin#deleteShareGroupOffsets(String groupId, Map<TopicPartitionSet<String>, Long>), AlterShareGroupOffsetsOptionsDeleteShareGroupOffsetsOptions)} call.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class AlterShareGroupOffsetsResultDeleteShareGroupOffsetsResult {
/**
* Return a future which succeeds only if all the alter offsetsdeletions succeed.
*/
public KafkaFuture<Void> all() {
}
/**
* Return a future which can be used to check the result for a given partitiontopic.
*/
public KafkaFuture<Void> partitionResult(final TopicPartitionString partitiontopic) {
}
} |
...
DeleteShareGroupOffsetsOptions
Code Block |
---|
|
package org.apache.kafka.client.admin;
/**
* Options for the {@link Admin#alterShareGroupOffsetsAdmin#deleteShareGroupOffsets(String groupId, Map<TopicPartitionSet<String>, Long>DeleteShareGroupOffsetsOptions), AlterShareGroupOffsetsOptions)} call.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class AlterShareGroupOffsetsOptionsDeleteShareGroupOffsetsOptions extends AbstractOptions<AlterShareGroupOffsetsOptions>AbstractOptions<DeleteShareGroupOffsetsOptions> {
} |
...
DeleteShareGroupsResult
Code Block |
---|
|
package org.apache.kafka.clients.admin;
/**
* The result of the {@link Admin#deleteShareGroupOffsetsAdmin#deleteShareGroups(StringCollection<String>, Set<String>, DeleteShareGroupOffsetsOptionsDeleteShareGroupsOptions)} call.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class DeleteShareGroupOffsetsResultDeleteShareGroupsResult {
/**
* Return a future which succeeds only if all the deletions succeed.
*/
public KafkaFuture<Void> all() {
}
/**
* Return a future map from group id to futures which can be used to check the resultstatus forof aindividual given topicdeletions.
*/
public Map<String, KafkaFuture<Void>KafkaFuture<Void>> partitionResultdeletedGroups(final String topic) {
}
} |
...
DeleteShareGroupsOptions
Code Block |
---|
|
package org.apache.kafka.client.admin;
/**
* Options for the {@link Admin#deleteShareGroupOffsetsAdmin#deleteShareGroups(StringCollection<String>, Set<String>, DeleteShareGroupOffsetsOptions)DeleteShareGroupsOptions)} call.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class DeleteShareGroupOffsetsOptionsDeleteShareGroupsOptions extends AbstractOptions<DeleteShareGroupOffsetsOptions>AbstractOptions<DeleteShareGroupsOptions> {
} |
...
DescribeShareGroupsResult
Code Block |
---|
|
package org.apache.kafka.clients.admin;
/**
* The result of the {@link Admin#deleteShareGroupsAdmin#describeShareGroups(Collection<String>, DeleteShareGroupsOptionsDescribeShareGroupsOptions)} call.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class DeleteShareGroupsResultDescribeShareGroupsResult {
/**
* Return a future which yields succeeds onlyall ShareGroupDescription objects, if all the deletionsdescribes succeed.
*/
public KafkaFuture<Map<String, KafkaFuture<Void>ShareGroupDescription>> all() {
}
/**
* Return a map from group id to futures which canyield be used to check the status of individual deletionsgroup descriptions.
*/
public Map<String, KafkaFuture<Void>>KafkaFuture<ShareGroupDescription>> deletedGroupsdescribedGroups() {
}
} |
...
ShareGroupDescription
This class does indeed reuse the MemberDescription
class intended for consumer groups. It is sufficiently general to work for share groups also.
Code Block |
---|
|
package org.apache.kafka.client.admin;
/**
* Options for the {@link Admin#deleteShareGroups(Collection<String>, DeleteShareGroupsOptions)} call.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class DeleteShareGroupsOptions extends AbstractOptions<DeleteShareGroupsOptions> {
} |
DescribeShareGroupsResult
Code Block |
---|
|
packageimport org.apache.kafka.common.Node;
import org.apache.kafka.common.ShareGroupState;
import org.apache.kafka.common.clientsacl.adminAclOperation;
/**
* A Thedetailed resultdescription of a single theshare {@link Admin#describeShareGroups(Collection<String>, DescribeShareGroupsOptions)} callgroup in the cluster.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class DescribeShareGroupsResultShareGroupDescription {
public /**
* Return a future which yields all ShareGroupDescription objects, if all the describes succeed.
*/
public KafkaFuture<Map<String, ShareGroupDescription>> all() {
}
/**
* Return a map from group id to futures which yield group descriptions.
*/
public Map<String, KafkaFuture<ShareGroupDescription>> describedGroups() {
}
} |
ShareGroupDescription
This class does indeed reuse the MemberDescription
class intended for consumer groups. It is sufficiently general to work for share groups also.
Code Block |
---|
|
package org.apache.kafka.client.admin;
import org.apache.kafka.common.Node;
import org.apache.kafka.common.ShareGroupState;
import org.apache.kafka.common.acl.AclOperation;
/**
* A detailed description of a single share group in the cluster.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class ShareGroupDescription {
public ShareGroupDescription(String groupId, Collection<MemberDescription> members, ShareGroupState state, Node coordinator);
public ShareGroupDescription(String groupId, Collection<MemberDescription> members, ShareGroupState state, Node coordinator, Set<AclOperation> authorizedOperations);
/**
* The id of the share group.
*/
public String groupId();
/**
* A list of the members of the share group.
*/
public Collection<MemberDescription> members();
/**
* The share group state, or UNKNOWN if the state cannot be parsed.
*/
public ShareGroupState state();
/**
* The group coordinator, or null if the coordinator is not known.
*/
public Node coordinator();
/**
* The authorized operations for this group, or null if that information is not known.
*/
public Set<AclOperation> authorizedOperations();
} |
DescribeShareGroupsOptions
Code Block |
---|
|
package org.apache.kafka.client.admin;
/**
* Options for {@link Admin#describeShareGroups(Collection<String>, DescribeShareGroupsOptions)}.
*
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class DescribeShareGroupsOptions extends AbstractOptions<DescribeShareGroupsOptions> {
public DescribeShareGroupsOptions includeAuthorizedOperations(boolean includeAuthorizedOperations);
public boolean includeAuthorizedOperations();
} |
ListShareGroupOffsetsResult
The offset returned for each topic-partition is the share-partition start offset (SPSO).
Code Block |
---|
|
package org.apache.kafka.clients.admin;
/**
* The result of the {@link Admin#listShareGroupOffsets(Map<String, ListShareGroupOffsetsSpec>, ListShareGroupOffsetsOptions)} call.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class ListShareGroupOffsetsResult {
/**
* Return a future which yields all Map<String, Map<TopicPartition, Long> objects, if requests for all the groups succeed.
*/
public KafkaFuture<Map<String, Map<TopicPartition, Long>>> all() {
}
/**
* Return a future which yields a map of topic partitions to offsets for the specified group.
*/
public KafkaFuture<Map<TopicPartition, Long>> partitionsToOffset(String groupId) {
}
} |
ListShareGroupOffsetsOptions
Code Block |
---|
|
package org.apache.kafka.client.admin;
/**
* Options for {@link Admin#listShareGroupOffsets(Map<String, ListShareGroupOffsetsSpec>, ListShareGroupOffsetsOptions)}.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class ListShareGroupOffsetsOptions extends AbstractOptions<ListShareGroupOffsetsOptions> {
} |
...
ShareGroupDescription(String groupId, Collection<MemberDescription> members, ShareGroupState state, Node coordinator);
public ShareGroupDescription(String groupId, Collection<MemberDescription> members, ShareGroupState state, Node coordinator, Set<AclOperation> authorizedOperations);
/**
* The id of the share group.
*/
public String groupId();
/**
* A list of the members of the share group.
*/
public Collection<MemberDescription> members();
/**
* The share group state, or UNKNOWN if the state cannot be parsed.
*/
public ShareGroupState state();
/**
* The group coordinator, or null if the coordinator is not known.
*/
public Node coordinator();
/**
* The authorized operations for this group, or null if that information is not known.
*/
public Set<AclOperation> authorizedOperations();
} |
DescribeShareGroupsOptions
Code Block |
---|
|
package org.apache.kafka.client.admin;
/**
* SpecificationOptions of share group offsets to list using for {@link Admin#listShareGroupOffsetsAdmin#describeShareGroups(Map<StringCollection<String>, ListShareGroupOffsetsSpec>, ListShareGroupOffsetsOptions)}.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class ListShareGroupOffsetsSpec {
public ListShareGroupOffsetsSpec();
/**
* Set the topic partitions whose offsets are to be listed for a share group.
*/
ListShareGroupOffsetsSpec topicPartitions(Collection<TopicPartition> topicPartitions);
/**
* Returns the topic partitions whose offsets are to be listed for a share group.
*/
Collection<TopicPartition> topicPartitions();
} |
...
DescribeShareGroupsOptions)}.
*
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class DescribeShareGroupsOptions extends AbstractOptions<DescribeShareGroupsOptions> {
public DescribeShareGroupsOptions includeAuthorizedOperations(boolean includeAuthorizedOperations);
public boolean includeAuthorizedOperations();
} |
ListShareGroupOffsetsResult
The offset returned for each topic-partition is the share-partition start offset (SPSO).
Code Block |
---|
|
package org.apache.kafka.clients.admin;
/**
* The result of the {@link Admin#listShareGroups(ListShareGroupsOptionsAdmin#listShareGroupOffsets(Map<String, ListShareGroupOffsetsSpec>, ListShareGroupOffsetsOptions)} call.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class ListShareGroupsResultListShareGroupOffsetsResult {
/**
* ReturnsReturn a future thatwhich yields eitherall anMap<String, exceptionMap<TopicPartition, Long> orobjects, theif fullrequests setfor ofall sharethe groupgroups listingssucceed.
*/
public KafkaFuture<Collection<ShareGroupListing>>KafkaFuture<Map<String, Map<TopicPartition, Long>>> all() {
}
/**
* ReturnsReturn a future which yields justa themap validof listings.
topic partitions to */
public KafkaFuture<Collection<ShareGroupListing>> valid() {
}
/**
* Returns a future which yields just the errors which occurredoffsets for the specified group.
*/
public KafkaFuture<Map<TopicPartition, KafkaFuture<Collection<Throwable>>Long>> errorspartitionsToOffset(String groupId) {
}
} |
...
ListShareGroupOffsetsOptions
Code Block |
---|
|
package org.apache.kafka.client.admin;
importpackage org.apache.kafka.commonclient.ShareGroupStateadmin;
/**
* AOptions listingfor of a share group in the cluster{@link Admin#listShareGroupOffsets(Map<String, ListShareGroupOffsetsSpec>, ListShareGroupOffsetsOptions)}.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class ShareGroupListingListShareGroupOffsetsOptions {
extends public ShareGroupListing(String groupId);
public ShareGroupListing(String groupId, Optional<ShareGroupState> state);
/**
* The id of the share group.
*/
public String groupId();
/**
* The share group state.
*/
public Optional<ShareGroupState> state();
} |
...
AbstractOptions<ListShareGroupOffsetsOptions> {
} |
ListShareGroupOffsetsSpec
Code Block |
---|
|
package org.apache.kafka.client.admin;
import org.apache.kafka.common.ShareGroupState;
/**
* Options for Specification of share group offsets to list using {@link Admin#listShareGroups(ListShareGroupsOptionsAdmin#listShareGroupOffsets(Map<String, ListShareGroupOffsetsSpec>, ListShareGroupOffsetsOptions)}.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class ListShareGroupsOptions extends AbstractOptions<ListShareGroupsOptions>ListShareGroupOffsetsSpec {
public ListShareGroupOffsetsSpec();
/**
* IfSet statesthe istopic set,partitions onlywhose groupsoffsets in these states willare to be returned.listed Otherwise,for alla groupsshare are returnedgroup.
*/
public ListShareGroupsOptions inStates(Set<ShareGroupState> statesListShareGroupOffsetsSpec topicPartitions(Collection<TopicPartition> topicPartitions);
/**
* ReturnReturns the listtopic ofpartitions Stateswhose thatoffsets are requestedto orbe emptylisted iffor noa states have been specifiedshare group.
*/
public Set<ShareGroupState> statesCollection<TopicPartition> topicPartitions();
} |
...
ListShareGroupsResult
Code Block |
---|
|
package org.apache.kafka.clients.admin;
/**
* The result of the {@link Admin#listGroupsAdmin#listShareGroups(ListGroupsOptionsListShareGroupsOptions)} call.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class ListGroupsResultListShareGroupsResult {
/**
* Returns a future that yields either an exception, or the full set of share group listings.
*/
public KafkaFuture<Collection<GroupListing>> public KafkaFuture<Collection<ShareGroupListing>> all() {
}
/**
* Returns a future which yields just the valid listings.
*/
public KafkaFuture<Collection<GroupListing>> public KafkaFuture<Collection<ShareGroupListing>> valid() {
}
/**
* Returns a future which yields just the errors which occurred.
*/
public public KafkaFuture<Collection<Throwable>> errors() {
}
} |
...
ShareGroupListing
Code Block |
---|
|
package org.apache.kafka.client.admin;
import org.apache.kafka.common.ShareGroupState;
/**
* A listing of a share group in the cluster.
* <p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class GroupListingShareGroupListing {
public GroupListing public ShareGroupListing(String groupId);
public ShareGroupListing(String groupId, GroupTypeOptional<ShareGroupState> typestate);
/**
* The id of the share group.
*/
public public String groupId();
/**
* The share group typestate.
*/
public public GroupTypeOptional<ShareGroupState> typestate();
} |
...
ListShareGroupsOptions
Code Block |
---|
|
package org.apache.kafka.client.admin;
import org.apache.kafka.common.GroupTypeShareGroupState;
/**
* Options for {@link Admin#listGroupsAdmin#listShareGroups(ListGroupsOptionsListShareGroupsOptions)}.
*
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving
public class ListGroupsOptionsListShareGroupsOptions extends AbstractOptions<ListGroupsOptions>AbstractOptions<ListShareGroupsOptions> {
/**
* If typesstates is set, only groups ofin these typesstates will be returned. Otherwise, all groups are returned.
*/
public ListGroupsOptionsListShareGroupsOptions typesinStates(Set<GroupType>Set<ShareGroupState> typesstates);
/**
* Return the list of typesStates that are requested or empty if no typesstates have been specified.
*/
public Set<GroupType>Set<ShareGroupState> typesstates();
} |
GroupType
Another case is added to the org.apache.kafka.common.GroupType
enum:
...