pnowojski commented on a change in pull request #7087: [FLINK-10843] 
[connectors] Make Kafka table factory versioning more flexible
URL: https://github.com/apache/flink/pull/7087#discussion_r233090756
 
 

 ##########
 File path: 
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/KafkaTableSourceSinkFactoryBase.java
 ##########
 @@ -187,9 +190,21 @@
        // 
--------------------------------------------------------------------------------------------
 
        /**
-        * Returns the Kafka version.
+        * Returns a hard-coded Kafka version.
+        *
+        * @deprecated This method can be dropped once we only maintain the 
universal Kafka connector.
         */
-       protected abstract String kafkaVersion();
+       @Deprecated
+       protected abstract Optional<String> kafkaVersion();
+
+       /**
+        * Returns the pattern that a validator should accept as Kafka version.
+        */
+       protected Pattern[] kafkaVersionPattern() {
 
 Review comment:
   Do we need two separate methods for that? Why can not we use just the more 
general one `kafkaVersionPattern`? Or maybe even better:
   ```
   protected abstract boolean isCompatible(String kafkaVersionString);
   ```
   which can be implemented either as `kafkaVersionString.equals("0.11")` or  
by patterns, without exposing the `Pattern` dependency and also being even more 
flexible?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to