Skip to content

Commit

Permalink
MINOR: Add topicIds and directoryIds to the return value of the toStr…
Browse files Browse the repository at this point in the history
…ing method. (apache#16189)

Add topicIds and directoryIds to the return value of the toString method.

Reviewers: Luke Chen <[email protected]>
  • Loading branch information
frankvicky authored Jun 4, 2024
1 parent 7e0caad commit d652f5c
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,23 @@ public Map<String, Uuid> topicIds() {
return topicIds;
}

public Map<TopicIdPartition, Uuid> directoryIds() {
return directoryIds;
}

@Override
public String toString() {
return String.format(
"LocalReplicaChanges(deletes = %s, newly elected leaders = %s, leaders = %s, followers = %s)",
"LocalReplicaChanges(deletes = %s, newly elected leaders = %s, leaders = %s, followers = %s, topicIds = %s, directoryIds = %s)",
deletes,
electedLeaders,
leaders,
followers
followers,
topicIds,
directoryIds
);
}

public Map<TopicIdPartition, Uuid> directoryIds() {
return directoryIds;
}

public static final class PartitionInfo {
private final Uuid topicId;
private final PartitionRegistration partition;
Expand All @@ -98,17 +100,17 @@ public PartitionInfo(Uuid topicId, PartitionRegistration partition) {
this.partition = partition;
}

@Override
public String toString() {
return String.format("PartitionInfo(topicId = %s, partition = %s)", topicId, partition);
}

public Uuid topicId() {
return topicId;
}

public PartitionRegistration partition() {
return partition;
}

@Override
public String toString() {
return String.format("PartitionInfo(topicId = %s, partition = %s)", topicId, partition);
}
}
}

0 comments on commit d652f5c

Please sign in to comment.