jshmchenxi commented on a change in pull request #1611:
URL: https://github.com/apache/hive/pull/1611#discussion_r550411547



##########
File path: jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java
##########
@@ -1002,11 +1002,19 @@ private String getSessionValue(String varName, String 
varDefault) {
     return varValue;
   }
 
-  // copy loginTimeout from driver manager. Thrift timeout needs to be in 
millis
+  // use socketTimeout from jdbc connection url. Thrift timeout needs to be in 
millis
   private void setupLoginTimeout() {
-    long timeOut = TimeUnit.SECONDS.toMillis(DriverManager.getLoginTimeout());
+    String socketTimeoutStr = 
sessConfMap.getOrDefault(JdbcConnectionParams.SOCKET_TIMEOUT, "0");
+    long timeOut = 0;

Review comment:
       Sorry for the late reply. If users depends on DriverManager.loginTimeout 
to control HS2 jdbc timeout, they will have to refactor their code after 
applying this. However, we haven't yet met a situation that we need this 
timeout to return quickly when HS2 hangs or something. Our problem is when 
submitting a big query which needs minutes to compile, the connection is lost 
because of this DriverManager.loginTimeout. Maybe we need to set a timeout 
parameter for HS2 on the server side too.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to