hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hive/HiveODBC" by EricHwang
Date Fri, 07 Aug 2009 02:26:23 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The following page has been changed by EricHwang:
http://wiki.apache.org/hadoop/Hive/HiveODBC

------------------------------------------------------------------------------
  == Hive ODBC Driver ==
- The Hive ODBC Driver is a software library that implements the Open Database Connectivity
(ODBC) API standard for the Hive database management system, enabling ODBC compliant applications
to interact seamlessly (ideally) with Hive through a standard interface.
+ The Hive ODBC Driver is a software library that implements the Open Database Connectivity
(ODBC) API standard for the Hive database management system, enabling ODBC compliant applications
to interact seamlessly (ideally) with Hive through a standard interface. 
  
  === Suggested Reading ===
  This guide assumes you are already familiar with the following:
@@ -26, +26 @@

  ==== Hive Client Build/Setup ====
  In order to build the Hive client:
   1. Checkout and setup the latest version of Apache Hive. For more details, see [wiki:Hive/GettingStarted
Getting Started with Hive]. From this point onwards, the path to the Hive root directory will
be referred to as HIVE_HOME.
-  1. Build the Hive client by running the following command from HIVE_HOME. This will compile
and copy the libraries and header files to {{{HIVE_HOME/build/odbc/}}}. Please keep in mind
that all paths should be fully specified (no relative paths).
+  1. Build the Hive client by running the following command from HIVE_HOME. This will compile
and copy the libraries and header files to {{{HIVE_HOME/build/odbc/}}}. Please keep in mind
that all paths should be fully specified (no relative paths). If you encounter an "{{{undefined
reference to vtables}}}" error, make sure that you have specified the absolute path for thrift.home.
   {{{
   $ ant compile-cpp -Dthrift.home=<THRIFT_HOME>
   }}}
@@ -34, +34 @@

   {{{
   $ ant compile-cpp -Dthrift.home=<THRIFT_HOME> -Dword.size=<32 or 64>
   }}}
+  You can verify the entire Hive compilation by running the Hive test suite from HIVE_HOME.
Specifying the argument '-Dthrift.home=<THRIFT_HOME>' will enable the tests for the
Hive client.
+  {{{
+  $ ant test -Dthrift.home=<THRIFT_HOME>
+  }}}
-  You can verify the compilation by running the Hive client test suite. You can specifically
execute the Hive client tests by running the following command from {{{HIVE_HOME/odbc/}}}.
NOTE: Hive client tests require that a local Hive Server be operating on port 10000.
+  You can specifically execute the Hive client tests by running the following command from
{{{HIVE_HOME/odbc/}}}. NOTE: Hive client tests require that a local Hive Server be operating
on port 10000.
   {{{
   $ ant test
   }}}
   1.#3 To install the Hive client libraries onto your machine, run the following command
from {{{HIVE_HOME/odbc/}}}. NOTE: The install path defaults to {{{/usr/local}}}, but this
can be changed by setting the {{{INSTALL_PATH}}} environment variable to a desired alternative.
   {{{
-  $ ant install -Dthrift.home=<THRIFT_HOME>
+  $ sudo ant install -Dthrift.home=<THRIFT_HOME>
   }}}
+  NOTE: The compiled static library, libhiveclient.a, requires linking with stdc++ as well
as thrift libraries to function properly.
  
  ==== unixODBC API Wrapper Build/Setup ====
  After you have built and installed the Hive client, you can now install the unixODBC API
wrapper:
@@ -64, +69 @@

   1.#3 If you want to completely install unixODBC and all related drivers:
    a. Run the following from the unixODBC root directory:
    {{{
-   $ make install
+   $ sudo make install
    }}}
-   a.#2 If your system complains about {{{undefined symbols}}} during unixODBC testing (such
as with {{{isql}}} or {{{odbcinst}}}) after installation, try running {{{ldconfig}}} to update
your library catalog.
+   a.#2 If your system complains about {{{undefined symbols}}} during unixODBC testing (such
as with {{{isql}}} or {{{odbcinst}}}) after installation, try running {{{ldconfig}}} to update
your dynamic linker's runtime libraries.
   1.#4 If you only want to obtain the Hive ODBC driver shared object library:
    a. After compilation, the driver will be located at {{{<unixODBC_BUILD_DIR>/Drivers/hive/.libs/libodbchive.so.1.0.0}}}.
    a. This may be copied to any other location as desired. Keep in mind that the Hive ODBC
driver has a dependency on the Hive client shared object library: {{{libhiveclient.so}}}.
@@ -112, +117 @@

  {{{
  $ isql -v Hive
  }}}
- If your system does not have isql, you can obtain it by installing the entirety of unixODBC.
+ If your system does not have isql, you can obtain it by installing the entirety of unixODBC.
If you encounter an error saying that the shared libraries cannot be opened by isql, use the
{{{ldd}}} tool to ensure that all dynamic library dependencies are resolved and use the {{{file}}}
tool to ensure that isql and all necessary libraries are compiled into the same architecture
(32 or 64 bit).
  
  === Current Status ===
+  * Comments:
+  Please keep in mind that this is still an initial version and is still very rough around
the edges. However, it provides basic ODBC 3.51 API support for connecting, executing queries,
fetching, etc. This driver has been successfully tested on 32-bit and 64-bit linux machines
with iSQL. It has also been tested with partial success on enterprise applications such as
MicroStrategy. The driver consists of two sections: the Hive client and the unixODBC API wrapper.
The unixODBC portion will be uploaded as a separate attachment that will not be part of this
repository (for licensing reasons).
   * Limitations:
    * No support for Unicode
    * Not thread safe
    * No support for asynchronous execution of queries
    * Does not check for memory allocation errors
+   * Does not support pattern matching for functions such as SQLColumns and SQLTables; requires
exact matches.
+   * Hive Server is currently not thread safe (see JIRA HIVE-80: https://issues.apache.org/jira/browse/HIVE-80).
This will prevent the driver from safely making multiple connections to the same Hive Server.
We need to resolve this issue to allow the driver to operate properly.
   * ODBC API Function Support:
    * SQLAllocConnect - supported
    * SQLAllocEnv   - supported

Mime
View raw message