You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "xiepengjie (Jira)" <ji...@apache.org> on 2021/03/31 07:36:00 UTC

[jira] [Updated] (HIVE-24959) Hive JDBC throws java.net.SocketTimeoutException: Read timed out

     [ https://issues.apache.org/jira/browse/HIVE-24959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

xiepengjie updated HIVE-24959:
------------------------------
    Description: 
In the hive-jdbc client side, timeout comes from DriverManager.getLoginTimeout(), but the timeout is global parameter like this:
{code:java}
public class DriverManager {
    ...
    private static volatile int loginTimeout = 0;
    ...
    public static void setLoginTimeout(int seconds) {
        loginTimeout = seconds;
    }
    ...
    public static int getLoginTimeout() {
        return (loginTimeout);
    }
{code}
when using different jdbc in the same jvm, for example: mysql-jdbc setup timeout 10, but hive-jdbc should be 0, it will affect each other. so, we should allowed user setupTimeout in HiveConnection.

> Hive JDBC throws  java.net.SocketTimeoutException: Read timed out
> -----------------------------------------------------------------
>
>                 Key: HIVE-24959
>                 URL: https://issues.apache.org/jira/browse/HIVE-24959
>             Project: Hive
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions: All Versions
>            Reporter: xiepengjie
>            Assignee: xiepengjie
>            Priority: Major
>
> In the hive-jdbc client side, timeout comes from DriverManager.getLoginTimeout(), but the timeout is global parameter like this:
> {code:java}
> public class DriverManager {
>     ...
>     private static volatile int loginTimeout = 0;
>     ...
>     public static void setLoginTimeout(int seconds) {
>         loginTimeout = seconds;
>     }
>     ...
>     public static int getLoginTimeout() {
>         return (loginTimeout);
>     }
> {code}
> when using different jdbc in the same jvm, for example: mysql-jdbc setup timeout 10, but hive-jdbc should be 0, it will affect each other. so, we should allowed user setupTimeout in HiveConnection.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)