Ensure you have administrator/root privileges on the computer before you install the driver.
Go to one of the following Hadoop vendor websites and download the Windows 32-bit Hive ODBC driver and associated documentation. For example:
- Cloudera: http://www.cloudera.com/downloads/connectors/hive/odbc/2-5-21.html
- Hortonworks: http://hortonworks.com/hdp/addons/
- MapR: http://package.mapr.com/tools/MapR-ODBC/. Select the latest version of the file MapR_odbc_<n.n.n>_x86.exe.
After downloading the file, double-click the file to run the installer.
Follow the installer's instructions and use the default settings.
For additional information about the installation and configuration settings, see the vendor's documentation.
Install on Linux
Go to one of the following Hadoop vendor websites and download the Linux 64-bit Hive ODBC driver and associated documentation. For example:
- Cloudera: http://www.cloudera.com/downloads/connectors/hive/odbc/2-5-12.html . Download the appropriate RPM for your Linux distribution.
- Hortonworks: http://hortonworks.com/hdp/addons/. Download the appropriate tar file for your Linux distribution and extract the RPMs from it.
- MapR: http://doc.mapr.com/display/MapR/Hive+ODBC+Connector and http://package.mapr.com/tools/MapR-ODBC/. Navigate the directories for your
Linux distribution and download the appropriate RPM. Unpack the RPM package to install the driver files in the vendor's default location:
rpm -i <vendor-file>.rpm
Note the location of the installed files for later configuration steps. The default installation location depends on the vendor and may be one of the following:
- /opt/Cloudera/hiveodbc/
- /usr/lib/hive/lib/native/hiveodbc/
- /opt/mapr/hiveodbc/
Continue with Configuring the Hive ODBC driver on Linux.
Configure the Hive ODBC driver on Linux
The Hive ODBC driver installation includes the file, <users-home>/.<vendor>.hiveodbc.ini, which you use to configure the specific vendor's Hive ODBC driver. By default, this file begins with a leading period and gets installed in the user's home directory.
If you decide not to use the default location and file name for .<vendor>.hiveodbc.ini, set an environment variable to locate the file. These examples assume you put the file (without a leading period) in the /etc/ directory:
- Cloudera:
- For Cloudera Hive ODBC driver version 2.5.12 and higher: Cloudera: export CLOUDERAHIVEINI=/etc/cloudera.hiveodbc.ini
- For Cloudera Hive ODBC driver versions prior to 2.5.12: Cloudera: export SIMBAINI=/etc/cloudera.hiveodbc.ini
- Hortonworks:
- For Hortonworks Hive ODBC driver version 0.11 and higher:
export SIMBAINI=/etc/hortonworks.hiveodbc.ini
- For Hortonworks Hive ODBC driver versions prior to 0.11:
export SIMBAINI=/etc/hortonworks.hiveodbc.ini
- For Hortonworks Hive ODBC driver version 0.11 and higher:
- MapR:
export MAPRINI=/etc/mapr.hive.odbc.ini
Set the following driver manager options in your vendor-specific configuration file, <vendor>.hiveodbc.ini, under the Driver section. The default Connect for Big Data driver manager is unixODBC.
- Set
DriverManagerEncoding
to UTF.-. - Set
ODBCInstLib
to identify the ODBC installation's shared library for the ODBC driver manager. The Connect for Big Data default location is <connect_install>/lib/libodbcinstSSL.so.[Driver] DriverManagerEncoding=UTF-16 ODBCInstLib=<connect_install>/lib/libodbcinstSSL.so
- Set
export LD_LIBRARY_PATH=<vendor's-Hive-ODBC-driver-
installation>/lib:$LD_LIBRARY_PATH
The default location Connect for Big Data uses for the .odbcinst.ini ODBC configuration file is <connect_install>/etc. If you decide to use a different location, set the ODBCSYSINI environment variable to the directory containing your file.
[ODBC Drivers]
<vendor> Hive ODBC Driver 64-bit=Installed
. . .
[<vendor> Hive ODBC Driver 64-bit]
Description= <vendor> Hive ODBC Driver (64-bit)
Driver=/<vendor's-Hive-ODBC-driver-installation>/<vendor’s_Hive_ODBC_library_file>
For additional information about the installation and configuration settings, see the vendor's documentation.