失效链接处理 |
Cloudera-JDBC-Driver-for-Apache-Hive-Install-Guide PDF 下载
本站整理下载:
提取码:q2tv
相关截图:
主要内容:
Cloudera JDBC Driver for Apache Hive Files
The Cloudera JDBC Driver for Apache Hive is delivered in the following ZIP archives, where
[Version] is the version number of the driver:
l HiveJDBC4_[Version].zip
l HiveJDBC41_[Version].zip
l HiveJDBC42_[Version].zip
The archive contains the driver supporting the JDBC API version indicated in the archive name, as
well as release notes and third-party license information. In addition, the required third-party
libraries and dependencies are packaged and shared in the driver JAR file in the archive.
Cloudera JDBC Driver for Apache Hive | 7
Cloudera JDBC Driver for Apache Hive Files
Installing and Using the Cloudera JDBC Driver for Apache Hive
To install the Cloudera JDBC Driver for Apache Hive on your machine, extract the files from the
appropriate ZIP archive to the directory of your choice.
To access a Hive data store using the Cloudera JDBC Driver for Apache Hive, you need to configure
the following:
l The list of driver library files (see "Referencing the JDBC Driver Libraries" on page 8) l The Driver or DataSource class (see "Registering the Driver Class" on page 9) l The connection URL for the driver (see "Building the Connection URL" on page 10)
Referencing the JDBC Driver Libraries
Before you use the Cloudera JDBC Driver for Apache Hive, the JDBC application or Java code that
you are using to connect to your data must be able to access the driver JAR files. In the application
or code, specify all the JAR files that you extracted from the ZIP archive.
Using the Driver in a JDBC Application
Most JDBC applications provide a set of configuration options for adding a list of driver library
files. Use the provided options to include all the JAR files from the ZIP archive as part of the driver
configuration in the application. For more information, see the documentation for your JDBC
application.
Using the Driver in Java Code
You must include all the driver library files in the class path. This is the path that the Java Runtime
Environment searches for classes and other resource files. For more information, see "Setting the
Class Path" in the appropriate Java SE Documentation.
For Java SE 6:
l For Windows:
https://docs.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html
l For Linux and Solaris:
https://docs.oracle.com/javase/6/docs/technotes/tools/solaris/classpath.html
For Java SE 7:
l For Windows:
http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html
l For Linux and Solaris:
http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/classpath.html
For Java SE 8:
l For Windows:
http://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html
8 | Cloudera JDBC Driver for Apache Hive
Installing and Using the Cloudera JDBC Driver for Apache Hive
l For Linux and Solaris:
http://docs.oracle.com/javase/8/docs/technotes/tools/solaris/classpath.html
Registering the Driver Class
Before connecting to your data, you must register the appropriate class for your application.
The following classes are used to connect the Cloudera JDBC Driver for Apache Hive to Hive data
stores: l The Driver classes extend java.sql.Driver. l The DataSource classes extend javax.sql.DataSource and
javax.sql.ConnectionPoolDataSource.
The driver supports the following fully-qualified class names (FQCNs) that are independent of the
JDBC version:
l com.cloudera.hive.jdbc.HS1Driver
l com.cloudera.hive.jdbc.HS2Driver
l com.cloudera.hive.jdbc.HS1DataSource
l com.cloudera.hive.jdbc.HS2DataSource
|