Install the Hive service
In Ambari, you install the Hive service as you would any other service, and in the process, you configure Hive to use a database for the Hive Metastore. You can use Oracle, PostgreSQL, or MySQL as the backend database.
If you use PostgreSQL as the backend database, a supported version later than 9.6 is recommended. Using PostgreSQL 9.6 or earlier can cause problems. Hive Metastore uses hash indexes for PostgreSQL. Hive also uses hash indexes for ACID transactions. TC_TXNID_INDEX and HL_TXNID_INDEX can become corrupted.
The workaround is to reindex the corrupted indexes. For example, in PostgreSQL run
reindex index tc_txnid_index.
Configure a database for the Hive Metastore.
- Choose to use an existing database suitable for production work and perform the next step.
- Choose an Ambari installed database, such as MySQL, suitable for development work only, and skip the next step.
- If you chose an existing database in the last step, create a hive user and database as described in Ambari documentation.
- Obtain the JDBC driver for the database, install, and set up the driver as described in Ambari documentation. Download the JDBC driver hive-jdbc from the https://www.cloudera.com/downloads/hdp.html
- In Ambari Services > Hive > Configs, test the connection to the database.
- Follow prompts from the Ambari wizard to complete the installation.