Download cloudera hive jdbc driver - very
Cloudera
This is the documentation for Cloudera Enterprise x. Documentation for other versions is available at Cloudera Documentation.
To access the Hive server with JDBC clients, such as Beeline, install the JDBC driver for HiveServer2 that is defined in .
The CDH Hive JDBC driver is not wire-compatible with the CDH version of HiveServer2. Make sure you upgrade Hive clients and all other Hive hosts in tandem: the server first, and then the clients.
- Install the package (it is included in CDH packaging). Use one of the following commands, depending on the target operating system:
- On Red-Hat-compatible systems: $ sudo yum install hive-jdbc
- On SLES systems: $ sudo zypper install hive-jdbc
- On Ubuntu or Debian systems: $ sudo apt-get install hive-jdbc
- Add /usr/lib/hive/lib/*.jar and /usr/lib/hadoop/*.jar to your classpath.
You are now ready to run your JDBC client. HiveServer2 has a new JDBC driver that supports both embedded and remote access to HiveServer2. The connection URLs are also different from those in previous versions of Hive.
For more information see the HiveServer2 Client document.
Connection URLs
The HiveServer2 connection URL has the following format:
jdbc:hive2://<host1>:<port1>,<host2>:<port2>/dbName;sess_var_list?hive_conf_list#hive_var_list- is a server instance or a comma separated list of server instances to connect to (if dynamic service discovery is enabled). If no server is mentioned here, the embedded server will be used.
- is the name of the initial database.
- is a semicolon separated list of key=value pairs of session variables. For example, .
- is a semicolon separated list of key=value pairs of Hive configuration variables for this session. For example, .
- is a semicolon separated list of key=value pairs of Hive variables for this session.
- For a remote server, the URL format is . The default HiveServer2 port is ).
- For an embedded server, the URL format is (no host or port).
- is the path where client's truststore file is located.
- is the password to access the truststore.

-
-