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



##########
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) {

Review comment:
       override->isBounded maybe more readable

##########
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",

Review comment:
       L431 has printed the log,here till needed?

##########
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:
       if statement do nothing looks weird.




----------------------------------------------------------------
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