-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MINOR: Fix Some Exceptions in MetaPropertiesEnsemble and MetadataQuorumCommand #18957
base: trunk
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvements @nihyxx. Can you add a description to the PR?
"\nLeaderId: " + quorumInfo.leaderId() + | ||
"\nLeaderEpoch: " + quorumInfo.leaderEpoch() + | ||
"\nHighWatermark: " + quorumInfo.highWatermark() + | ||
"\nMaxFollowerLag: " + maxFollowerLag + | ||
"\nMaxFollowerLagTimeMs: " + maxFollowerLagTimeMs + | ||
"\nCurrentVoters: " + printVoterState(quorumInfo) + | ||
"\nCurrentObservers: " + printObserverState(quorumInfo) | ||
"\nLeaderId: " + quorumInfo.leaderId() + | ||
"\nLeaderEpoch: " + quorumInfo.leaderEpoch() + | ||
"\nHighWatermark: " + quorumInfo.highWatermark() + | ||
"\nMaxFollowerLag: " + maxFollowerLag + | ||
"\nMaxFollowerLagTimeMs: " + maxFollowerLagTimeMs + | ||
"\nCurrentVoters: " + printVoterState(quorumInfo) + | ||
"\nCurrentObservers: " + printObserverState(quorumInfo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This indentation doesn't look correct. We indent Java code using 4 spaces.
@@ -404,16 +404,16 @@ static Set<RaftVoterEndpoint> getControllerAdvertisedListeners( | |||
} | |||
LinkedHashSet<RaftVoterEndpoint> results = new LinkedHashSet<>(); | |||
for (String listenerName : props.getProperty( | |||
KRaftConfigs.CONTROLLER_LISTENER_NAMES_CONFIG).split(",")) { | |||
KRaftConfigs.CONTROLLER_LISTENER_NAMES_CONFIG).split(",")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this indentation and formatting so that the for loop statement block is clearly separated from the for loop iterable.
for (String listenerName : props.getProperty(
KRaftConfigs.CONTROLLER_LISTENER_NAMES_CONFIG).split(",")
) {
endpoint.host() == null ? "localhost" : endpoint.host(), | ||
endpoint.port())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this formatting?
results.add(
new RaftVoterEndpoint(
endpoint.listenerName().get(),
endpoint.host() == null ? "localhost" : endpoint.host(),
endpoint.port()
)
);
What
This is a minor PR to remove some unneeded exceptions and make Exceptions more specific.
Committer Checklist (excluded from commit message)