[GitHub] [flink] V1ncentzzZ commented on a change in pull request #14387: [FLINK-19691][Connector][jdbc] Expose `CONNECTION_CHECK_TIMEOUT_SECONDS` as a configurable option in Jdbc connector

2020-12-22 Thread GitBox


V1ncentzzZ commented on a change in pull request #14387:
URL: https://github.com/apache/flink/pull/14387#discussion_r547609486



##
File path: 
flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcDynamicTableFactory.java
##
@@ -324,6 +332,13 @@ private void validateConfigOptions(ReadableConfig config) {
SINK_MAX_RETRIES.key(),
config.get(SINK_MAX_RETRIES)));
}
+
+   if (config.get(MAX_RETRY_TIMEOUT).getSeconds() <= 0) {
+   throw new IllegalArgumentException(String.format(
+   "The value of '%s' option must be in second 
granularity and shouldn't be smaller than 1 second, but is %s.",
+   MAX_RETRY_TIMEOUT.key(),
+   
config.get(ConfigOptions.key(MAX_RETRY_TIMEOUT.key()).stringType().noDefaultValue(;

Review comment:
   I'm not sure the second placeholder maybe 
`config.get(MAX_RETRY_TIMEOUT).getSeconds()` instead of 
`config.get(ConfigOptions.key(MAX_RETRY_TIMEOUT.key()).stringType().noDefaultValue()))`.





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




[GitHub] [flink] V1ncentzzZ commented on a change in pull request #14387: [FLINK-19691][Connector][jdbc] Expose `CONNECTION_CHECK_TIMEOUT_SECONDS` as a configurable option in Jdbc connector

2020-12-21 Thread GitBox


V1ncentzzZ commented on a change in pull request #14387:
URL: https://github.com/apache/flink/pull/14387#discussion_r547052214



##
File path: 
flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcDynamicTableFactory.java
##
@@ -322,6 +329,13 @@ private void validateConfigOptions(ReadableConfig config) {
SINK_MAX_RETRIES.key(),
config.get(SINK_MAX_RETRIES)));
}
+
+   if (config.get(MAX_RETRY_TIMEOUT).getSeconds() <= 0) {
+   throw new IllegalArgumentException(String.format(
+   "The value of '%s' option must be in second 
granularity and larger than 1 second, but is %s.",

Review comment:
   Maybe `larger than 0 second` instead of `larger than 1 second`?





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




[GitHub] [flink] V1ncentzzZ commented on a change in pull request #14387: [FLINK-19691][Connector][jdbc] Expose `CONNECTION_CHECK_TIMEOUT_SECONDS` as a configurable option in Jdbc connector

2020-12-15 Thread GitBox


V1ncentzzZ commented on a change in pull request #14387:
URL: https://github.com/apache/flink/pull/14387#discussion_r543196684



##
File path: 
flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/internal/options/JdbcOptions.java
##
@@ -100,14 +100,20 @@ public Builder setUsername(String username) {
return this;
}
 
+   /**
+* optional, CONNECTION_CHECK_TIMEOUT_SECONDS.
+*/
+   public Builder setCONNECTION_CHECK_TIMEOUT_SECONDS(int 
setCONNECTION_CHECK_TIMEOUT_SECONDS) {

Review comment:
   Please keep the parameters named with camel case.





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