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:
Jason Gustafson 2018-05-22 11:23:47 -07:00 committed by GitHub
parent c1b30a12b1
commit 5be47a2f26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -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,

View File

@ -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));
} }

View File

@ -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;