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

jdbc HTTP configuration options should be part of sessionConf part of connection string

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.13.0
    • 0.14.0
    • HiveServer2, JDBC
    • None
    • Check jira description.

    Description

      The http connection parameters are currently part of the HiveConf section of the connection string. It should ideally be part of SessionConf section, as that is where rest of the connection parameters are.
      HTTP transport parameters are not part of the hiveconfiguration parameters that need to be set.
      ie
      instead of
      jdbc:hive2://<host>:<port>/<db>?hive.server2.transport.mode=http;hive.server2.thrift.http.path=<http_endpoint>
      it should be -
      jdbc:hive2://<host>:<port>/<db>;transportMode=http;httpPath=<http_endpoint>

      Release Note:

      The JDBC Uri for HiveServer2 has the form:

      jdbc:hive2://host1:port1,host2:port2/dbName;sess_var_list?hive_conf_list#hive_var_list
      

      Ideally, sess_var_list is supposed to be used to pass parameters that will be used within the JDBC Driver. However, some of the http mode parameters were being passed in the hive_conf_list which we've fixed now (in a backward compatible way).
      Additionally, JDBC Driver has a naming convention for the parameters in the JDBC Uri which were not followed to the sasl.qop parameter. We've renamed it in a backward compatible way.

      Details:
      1. HTTP Mode params:
      Old example uri:

      jdbc:hive2://host:port/dbName;user=username;password=password?hive.server2.transport.mode=http;hive.server2.thrift.http.path=httpEndpoint
      

      New example uri:

      jdbc:hive2://host:port/dbName;user=username;password=password;transportMode=http;httpPath=httpEndpoint?hive.server2.logging.operation.enabled=false
      

      As you can see above, hive.server2.transport.mode has been renamed to transportMode, hive.server2.thrift.http.path has been renamed to httpPath and both have been moved from hive_conf_list to sess_var_list.

      2. Sasl qop renaming:
      Old example uri:

      jdbc:hive2://host:port/dbName;principal=hiveserver2KerberosPrincipal;sasl.qop=qopValue
      

      New example uri:

      jdbc:hive2://host:port/dbName;principal=hiveserver2KerberosPrincipal;saslQop=qopValue
      

      As you can see sasl.qop has been renamed to saslQop.

      Note: all changes are backward compatible and print a deprecation message like the following:

      0: jdbc:hive2://localhost:10001> !connect jdbc:hive2://localhost:10001/;sasl.qop=auth?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice username password org.apache.hive.jdbc.HiveDriver
      Connecting to jdbc:hive2://localhost:10007/;sasl.qop=auth?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice
      14/10/07 16:22:24 INFO jdbc.Utils: Supplied authorities: localhost:10001
      14/10/07 16:22:24 WARN jdbc.Utils: ***** JDBC param deprecation *****
      14/10/07 16:22:24 WARN jdbc.Utils: The use of sasl.qop is deprecated.
      14/10/07 16:22:24 WARN jdbc.Utils: Please use saslQop like so: jdbc:hive2://<host>:<port>/dbName;saslQop=<qop_value>
      14/10/07 16:22:24 WARN jdbc.Utils: ***** JDBC param deprecation *****
      14/10/07 16:22:24 WARN jdbc.Utils: The use of hive.server2.transport.mode is deprecated.
      14/10/07 16:22:24 WARN jdbc.Utils: Please use transportMode like so: jdbc:hive2://<host>:<port>/dbName;transportMode=<transport_mode_value>
      14/10/07 16:22:24 WARN jdbc.Utils: ***** JDBC param deprecation *****
      14/10/07 16:22:24 WARN jdbc.Utils: The use of hive.server2.thrift.http.path is deprecated.
      14/10/07 16:22:24 WARN jdbc.Utils: Please use httpPath like so: jdbc:hive2://<host>:<port>/dbName;httpPath=<http_path_value>
      Connected to: Apache Hive (version 0.14.0-SNAPSHOT)
      Driver: Hive JDBC (version 0.14.0-SNAPSHOT)
      Transaction isolation: TRANSACTION_REPEATABLE_READ
      

      Attachments

        1. HIVE-6972.1.patch
          7 kB
          Vaibhav Gumashta
        2. HIVE-6972.2.patch
          7 kB
          Vaibhav Gumashta
        3. HIVE-6972.3.patch
          7 kB
          Vaibhav Gumashta
        4. HIVE-6972.4.patch
          9 kB
          Vaibhav Gumashta

        Issue Links

          Activity

            People

              vgumashta Vaibhav Gumashta
              thejas Thejas Nair
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: