bharathgunapati commented on code in PR #52:
URL: 
https://github.com/apache/flink-connector-http/pull/52#discussion_r3523642776


##########
flink-connector-http/src/main/java/org/apache/flink/connector/http/table/lookup/RequestFactoryBase.java:
##########
@@ -44,14 +44,12 @@
 @Slf4j
 public abstract class RequestFactoryBase implements HttpRequestFactory {
 
-    public static final String DEFAULT_REQUEST_TIMEOUT_SECONDS = "30";

Review Comment:
   Removed the hardcoded `DEFAULT_REQUEST_TIMEOUT_SECONDS = "30"` fallback.
   
   The default now comes from the declared option itself:
   `HttpLookupConnectorOptions.SOURCE_LOOKUP_REQUEST_TIMEOUT.defaultValue()`
   (`Duration.ofSeconds(30)`), which is the single source of truth on
   `SOURCE_LOOKUP_REQUEST_TIMEOUT`.
   
   When the user does not set `http.source.lookup.request.timeout`, we read it 
via
   `readableConfig.get(SOURCE_LOOKUP_REQUEST_TIMEOUT)`; if `ReadableConfig` is
   unavailable (e.g. certain test/explain paths), we fall back to the option’s
   `.defaultValue()` rather than duplicating `"30"` in runtime code.
   
   This avoids two defaults drifting apart (string constant vs. `ConfigOption`) 
and
   matches how other Flink connectors resolve typed options.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to