mirror of https://github.com/apache/kafka.git
MINOR: AdminClient consumer group domain objects should have public constructors (#5063)
These constructors should be public to allow users to write test cases using them. We follow a similar pattern for the other domain objects that we expose in `AdminClient` (e.g. `TopicDescription`). Reviewers: Ismael Juma <ismael@juma.me.uk>
This commit is contained in:
parent
c1b30a12b1
commit
5be47a2f26
|
@ -37,7 +37,7 @@ public class ConsumerGroupDescription {
|
||||||
private final ConsumerGroupState state;
|
private final ConsumerGroupState state;
|
||||||
private final Node coordinator;
|
private final Node coordinator;
|
||||||
|
|
||||||
ConsumerGroupDescription(String groupId,
|
public ConsumerGroupDescription(String groupId,
|
||||||
boolean isSimpleConsumerGroup,
|
boolean isSimpleConsumerGroup,
|
||||||
Collection<MemberDescription> members,
|
Collection<MemberDescription> members,
|
||||||
String partitionAssignor,
|
String partitionAssignor,
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class MemberAssignment {
|
||||||
*
|
*
|
||||||
* @param topicPartitions List of topic partitions
|
* @param topicPartitions List of topic partitions
|
||||||
*/
|
*/
|
||||||
MemberAssignment(Set<TopicPartition> topicPartitions) {
|
public MemberAssignment(Set<TopicPartition> topicPartitions) {
|
||||||
this.topicPartitions = topicPartitions == null ? Collections.<TopicPartition>emptySet() :
|
this.topicPartitions = topicPartitions == null ? Collections.<TopicPartition>emptySet() :
|
||||||
Collections.unmodifiableSet(new HashSet<>(topicPartitions));
|
Collections.unmodifiableSet(new HashSet<>(topicPartitions));
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class MemberDescription {
|
||||||
private final String host;
|
private final String host;
|
||||||
private final MemberAssignment assignment;
|
private final MemberAssignment assignment;
|
||||||
|
|
||||||
MemberDescription(String memberId, String clientId, String host, MemberAssignment assignment) {
|
public MemberDescription(String memberId, String clientId, String host, MemberAssignment assignment) {
|
||||||
this.memberId = memberId == null ? "" : memberId;
|
this.memberId = memberId == null ? "" : memberId;
|
||||||
this.clientId = clientId == null ? "" : clientId;
|
this.clientId = clientId == null ? "" : clientId;
|
||||||
this.host = host == null ? "" : host;
|
this.host = host == null ? "" : host;
|
||||||
|
|
Loading…
Reference in New Issue