Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-24959

Hive JDBC throws java.net.SocketTimeoutException: Read timed out

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • All Versions
    • None
    • JDBC
    • None

    Description

      In the hive-jdbc client side, timeout comes from DriverManager.getLoginTimeout(), but the timeout is global parameter like this:

      public class DriverManager {
          ...
          private static volatile int loginTimeout = 0;
          ...
          public static void setLoginTimeout(int seconds) {
              loginTimeout = seconds;
          }
          ...
          public static int getLoginTimeout() {
              return (loginTimeout);
          }
      

      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.

      Attachments

        Activity

          People

            xiepengjie xiepengjie
            xiepengjie xiepengjie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: