Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could we move directoryIds() method above toString() method for better readability?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense. The toString() method is just a utility function, so we should arrange it appropriately.

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