ramazan-yapparov commented on a change in pull request #13636:
URL: https://github.com/apache/beam/pull/13636#discussion_r563605230
##########
File path:
examples/java/src/main/java/org/apache/beam/examples/complete/kafkatopubsub/kafka/consumer/Utils.java
##########
@@ -162,4 +165,11 @@ public static boolean isSslSpecified(KafkaToPubsubOptions
options) {
|| options.getKeystorePath() != null
|| options.getKeyPassword() != null;
}
+
+ public static Map<String, Object> parseKafkaConsumerConfig(String
kafkaConsumerConfig) {
+ return Arrays.stream(kafkaConsumerConfig.split(";"))
+ .map(s -> s.split("="))
+ .map(kv -> Pair.of(kv[0], kv[1]))
+ .collect(Collectors.toMap(Pair::getKey, Pair::getValue));
Review comment:
Removed `Pair` related code, but left method in place.
This class is created for such methods, in my opinion it is better to
declare them in `Utils` in order to leave main class as clean as possible
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]