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
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 |
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
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 Administrators who all Hive queries to run as the
hive
system user rather the actual user who submitted the query must set thehive.server2.enable.doAs
configuration property totrue
and must configure HiveServer2 to use a local Metastore. A value oftrue
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:
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*
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.Verify that the .jar file has appropriate permissions.