1. Install the Hive and HCatalog RPMs

[Note]Note

It is recommended that you set the soft and hard limits for number of processes that the Hive user can consume in your server /etc/security/limits.conf file as follows.

For non-secured clusters:

<hive user ID>     soft     nproc     128
<hive user ID>     hard     nproc     1024

For secured clusters:

<hive user ID>     soft     nproc     128
<hive user ID>     hard     nproc     32768

  1. On all client/gateway nodes (on which Hive programs will be executed), Hive Metastore Server, and HiveServer2 machine, install the Hive RPMs.

    • For RHEL/CentOS/Oracle Linux:

      yum install hive
       yum install hive-hcatalog
    • For SLES:

      zypper install hive
       zypper install hive-catalog
  2. Optional - Download and install the database connector .jar file for your Hive metastore database.

    By default, Hive uses an embedded Derby database for its metastore. However, you can choose to enable a local or remote database for the Hive metastore. Hive supports Derby, MySQL, Oracle, SQL Server, and Postgres. You will need to install the appropriate JDBC connector for your Hive metastore database. Hortonworks recommends using an embedded instance of the Hive Metastore with HiveServer2. An embedded metastore runs in the same process with HiveServer2 rather than as a separate daemon.

    [Note]Note

    Administrators who all Hive queries to run as the hive system user rather the actual user who submitted the query must set the hive.server2.enable.doAs configuration property to true and must configure HiveServer2 to use a local Metastore. A value of true for this property requires a local Metastore server.

    For example, if you previously installed MySQL, you would use the following steps to install the MySQL JDBC connector:

    1. Execute the following command on the Hive metastore machine.

      [For RHEL/CENTOS/ORACLE LINUX]
      yum install mysql-connector-java*

      [For SLES]
      zypper install mysql-connector-java*
    2. After the install, the MySQL connector .jar file is placed in the /usr/share/java/ directory. Copy the downloaded .jar file to the /usr/lib/hive/lib/ directory on your Hive host machine.

    3. Verify that the .jar file has appropriate permissions.


loading table of contents...