...
HiveServer2 has a new JDBC driver. It supports both embedded and remote access to HiveServer2.
Connection URLs
Connection URL Format
The HiveServer2 URL is a string with the following syntax:
jdbc:hive2://<host1>:<port1>,<host2>:<port2>/dbName;sess_var_list?hive_conf_list#hive_var_list
where
<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 databasesess_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
Connection URL for Remote or Embedded Mode
...