-
Notifications
You must be signed in to change notification settings - Fork 14.3k
KAFKA-18760: Deprecate Optional<String> and return String from public Endpoint#listener #19191
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
base: trunk
Are you sure you want to change the base?
Conversation
9a88650
to
576b3df
Compare
… EndPoint#listenerName Signed-off-by: PoAn Yang <[email protected]>
576b3df
to
5a57f0b
Compare
Signed-off-by: PoAn Yang <[email protected]>
Signed-off-by: PoAn Yang <[email protected]>
Signed-off-by: PoAn Yang <[email protected]>
Signed-off-by: PoAn Yang <[email protected]>
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.
@FrankYang0529 thanks for this patch
/** | ||
* @deprecated Since 4.1. Use {@link #listener()} instead. This function will be removed in 5.0. | ||
*/ | ||
@Deprecated |
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.
@Deprecated(since = "4.1", forRemoval = true)
*/ | ||
@Deprecated |
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.
@Deprecated(since = "4.1", forRemoval = true)
public class Endpoint { | ||
|
||
private final String listenerName; | ||
private final SecurityProtocol securityProtocol; | ||
private final String host; | ||
private final int port; | ||
|
||
public static String parseListenerName(String connectionString) { |
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.
it seems only KafkaConfig
uses this helper. Could you please move it to the KafkaConfig
instead of leaving it in this public APIs?
* Returns the listener name of this endpoint. | ||
*/ | ||
public String listener() { | ||
return listenerName; |
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 renaming it to listenerName
for consistency?
Signed-off-by: PoAn Yang <[email protected]>
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.
LGTM, thanks for this patch.
@FrankYang0529 please fix the conflicts |
@FrankYang0529 please fix the conflicts |
@FrankYang0529 please rebase code to include the fix |
org.apache.kafka.common.Endpoint#listenerName.
org.apache.kafka.common.Endpoint.
replace org.apache.kafka.clients.admin.RaftVoterEndpoint#name
Reviewers: TaiJuWu [email protected], TengYao Chi
[email protected], Chia-Ping Tsai [email protected]