...
<host1>:<port1>,<host2>:<port2>
is a server instance or a comma separated list of server instances to connect to (if dynamic service discovery is enabled). If empty, the embedded server will be used.dbName
is the name of the initial database.sess_var_list
is a semicolon separated list of key=value pairs of session variables (e.g.,user=foo;password=bar
).hive_conf_list
is a semicolon separated list of key=value pairs of Hive configuration variables for this session (e.g.,hive.server2.transport.mode=http;hive.server2.thrift.http.path=hs2
).hive_var_list
is a semicolon separated list of key=value pairs of Hive variables for this session.
...
JDBC connection URL: jdbc:hive2://<host>:<port>/<db>?hive.server2.transport.mode;transportMode=http;hive.server2.thrift.http.pathhttpPath=<http_endpoint>
, where:
<http_endpoint>
is the corresponding HTTP endpoint configured in hive-site.xml. Default value is cliservice.- Default port for HTTP transport mode is 10001
...
- site.xml. Default value is
cliservice
. - Default port for HTTP transport mode is 10001
Info | ||
---|---|---|
| ||
In versions earlier than 0.14 these parameters used to be called |
Connection URL When SSL Is Enabled in HiveServer2
...
In HTTP mode: jdbc:hive2://<host>:<port>/<db>;ssl=true;sslTrustStore=<trust_store_path>;trustStorePassword=<trust_store_password>?hive.server2.transport.mode;transportMode=http;hive.server2.thrift.http.pathhttpPath=<http_endpoint>
.
Using JDBC
...
jdbc:hive2://<host>:<port>/<db>;ssl=true;twoWay=true;
sslTrustStore=<trust_store_path>;trustStorePassword=<trust_store_password>;sslKeyStore=<key_store_path>;keyStorePassword=<key_store_password>
?hive.server2.transport.modetransportMode=http;hive.server2.thrift.http.pathhttpPath=<http_endpoint>
- <trust_store_path> is the path where the client's truststore file lives. This is a mandatory non-empty field.
- <trust_store_password> is the password to access the truststore.
- <key_store_path> is the path where the client's keystore file lives. This is a mandatory non-empty field.
- <key_store_password> is the password to access the keystore.
...
jdbc:hive2://<host>:<port>/<db>?hive.server2.transport.mode;transportMode=http;hive.server2.thrift.http.pathhttpPath=<http_endpoint>;http.header.<name1>=<value1>;http.header.<name2>=<value2>
...