JNSimba commented on code in PR #461:
URL: 
https://github.com/apache/doris-flink-connector/pull/461#discussion_r1705358194


##########
flink-doris-connector/src/main/java/org/apache/doris/flink/sink/BackendUtil.java:
##########
@@ -100,11 +101,22 @@ public static boolean tryHttpConnection(String host) {
             LOG.debug("try to connect host {}", host);
             host = "http://"; + host;
             URL url = new URL(host);
-            HttpURLConnection co = (HttpURLConnection) url.openConnection();
-            co.setConnectTimeout(60000);
-            co.connect();
-            co.disconnect();
-            return true;
+            HttpURLConnection connection = (HttpURLConnection) 
url.openConnection();
+            connection.setRequestMethod("GET");
+            connection.setConnectTimeout(2000);
+            connection.setReadTimeout(2000);

Review Comment:
   Is 2 seconds too little?



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to