Skip to content

Commit

Permalink
[LI-HOTFIX] add back old parseAndValidateAddresses API for backward c…
Browse files Browse the repository at this point in the history
…ompatibility (#39)

TICKET =
LI_DESCRIPTION =
Some apps such as linkedin-kafka-clients and likafka-cruise-control still reply on this API:
parseAndValidateAddresses(List<String> urls).
This patch adds back the function.

EXIT_CRITERIA = MANUAL ["when no APP makes direct use of this API"]
  • Loading branch information
xiowu0 authored Aug 28, 2019
1 parent d902f8d commit 851a0f9
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ public static List<InetSocketAddress> parseAndValidateAddresses(List<String> url
return parseAndValidateAddresses(urls, ClientDnsLookup.forConfig(clientDnsLookupConfig));
}

/**
* Kafka does not use this function directly. However,
* some third-party applications still rely on this API to parse and validate addresses.
*/
public static List<InetSocketAddress> parseAndValidateAddresses(List<String> urls) {
return parseAndValidateAddresses(urls, ClientDnsLookup.DEFAULT);
}

public static List<InetSocketAddress> parseAndValidateAddresses(List<String> urls, ClientDnsLookup clientDnsLookup) {
List<InetSocketAddress> addresses = new ArrayList<>();
for (String url : urls) {
Expand Down

0 comments on commit 851a0f9

Please sign in to comment.