Database Reference
In-Depth Information
Thrift Client
The Hive server is exposed as a Thrift service, so it's possible to interact with it using
any programming language that supports Thrift. There are third-party projects provid-
ing clients for Python and Ruby; for more details, see the Hive wiki .
JDBC driver
Hive provides a Type 4 (pure Java) JDBC driver, defined in the class
org.apache.hadoop.hive.jdbc.HiveDriver . When configured with a
JDBC URI of the form jdbc:hive2:// host : port / dbname , a Java application
will connect to a Hive server running in a separate process at the given host and port.
(The driver makes calls to an interface implemented by the Hive Thrift Client using the
Java Thrift bindings.)
You may alternatively choose to connect to Hive via JDBC in embedded mode using
the URI jdbc:hive2:// . In this mode, Hive runs in the same JVM as the applica-
tion invoking it; there is no need to launch it as a standalone server, since it does not
use the Thrift service or the Hive Thrift Client.
The Beeline CLI uses the JDBC driver to communicate with Hive.
ODBC driver
An ODBC driver allows applications that support the ODBC protocol (such as busi-
ness intelligence software) to connect to Hive. The Apache Hive distribution does not
ship with an ODBC driver, but several vendors make one freely available. (Like the
JDBC driver, ODBC drivers use Thrift to communicate with the Hive server.)
Search WWH ::




Custom Search