lirui-apache commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r537258582



##########
File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
                        Duration monitorInterval = 
configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
                                        ? DEFAULT_LOOKUP_MONITOR_INTERVAL
                                        : 
configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-                       Preconditions.checkArgument(
-                                       monitorInterval.toMillis() >= 
DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-                                       String.format(
-                                                       "Currently the value of 
'%s' is required bigger or equal to default value '%s' " +
-                                                                       "when 
set '%s' to 'latest', but actual is '%s'",
-                                                       
STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-                                                       
DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-                                                       
STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-                                                       
monitorInterval.toMillis())
-                       );
+
+                       if (monitorInterval.toMillis() < 
DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+                               LOG.warn(String.format(
+                                       "Currently the recommended value of 
'%s' is bigger than default value '%s' " +

Review comment:
       @leonardBang  I see your point and I didn't realize it's distributed 
access to HMS. In that case, I'm fine to keep the threshold as it is. Perhaps 
we should worry more about how many tasks can concurrently access HMS, than how 
often they access.
   
   One more suggestion about the log message: I think `"Currently the 
recommended value of '%s' is at least '%s' when set...` is easier to understand.




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


Reply via email to