THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
public abstract class AdminClient implements AutoCloseable {
public abstract DescribeGroupsResult describeGroups(Collection<String> groupIds, DescribeGroupsOptions options);
public DescribeGroupsResult describeGroups(Collection<String> groupIds) {
return describeGroups(groupIds, new DescribeGroupsOptions());
}
public abstract ListGroupsResult listGroups(ListGroupsOptions options);
public ListGroupsResult listGroups() {
return listGroups(new ListGroupsOptions());
}
public abstract ListGroupsResult listConsumerGroups(ListGroupsOptions options); //filtering groups by ConsumerProtocol.PROTOCOL_TYPE
public ListGroupsResult listConsumerGroups() {
return listGroups(new ListGroupsOptions());
}
public ListGroupOffsetsResult listGroupOffsets(String groupId, ListGroupsOptions options);
public ListGroupOffsetsResult listGroupOffsets(String groupId) {
return listGroupOffsets(new ListGroupOffsetsOptions());
}
}
public class DescribeGroupOptions extends AbstractOptions<DescribeGroupOptions> {
}
public class DescribeGroupResult {
private final Map<String, KafkaFuture<GroupDescription>> futures;
...
}
public class GroupDescription {
private final String groupId;
private final String protocolType;
private final List<MemberDescription> members;
}
public class MemberDescription {
private final String consumerId;
private final String clientId;
private final String host;
private final Assignment assignment;
}
public class Assignment {
private final List<TopicPartition> assignment;
}
public class ListGroupsOptions extends AbstractOptions<ListGroupsOptions> {
}
public class ListGroupsResult {
final KafkaFuture<Map<String, GroupListing>> future;
//...
}
public class GroupListing {
private final String name;
private final String protocolType;
}
public class ListGroupOffsetsOptions extends AbstractOptions<ListGroupsOptions> {
}
public class ListGroupOffsetsResult {
final KafkaFuture<Map<TopicPartition, OffsetAndMetadata>> future;
//...
}
|
...