xiaoHoly commented on a change in pull request #14531:
URL: https://github.com/apache/flink/pull/14531#discussion_r550387370



##########
File path: 
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/KafkaSourceBuilder.java
##########
@@ -458,6 +458,29 @@ private boolean maybeOverride(String key, String value, 
boolean override) {
         return overridden;
     }
 
+    private boolean maybeOverridePartitionDiscovery(String key, String value, 
boolean override) {
+        boolean overridden = false;
+        String userValue = props.getProperty(key);
+        if (override) {
+            LOG.warn(
+                    String.format(
+                            "Property %s is provided but will be overridden 
from %s to %s",
+                            key, userValue, value));
+            props.setProperty(key, value);
+            overridden = true;
+        } else {
+            if (userValue != null) {
+

Review comment:
       @zhuxiaoshang .thanks for review. Yes, I should use a more elegant way.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to