3. Set Up the Hive/HCatalog Configuration Files

There are several configuration files that need to be set up for Hive/HCatalog.

 3.1. Extract the Hive/HCatalog Configuration Files

From the file you downloaded in Download Companion Files, extract the files in configuration_files -> hive to a temporary directory.

 3.2. Modify the Configuration Files

In the temporary directory, locate the following file and modify the properties based on your environment. Search for TODO in the files for the properties to replace.

 

Table 6.1. hive-site.xml

PropertyExampleDescription

javax.jdo.option.ConnectionURL

For MySQL database: jdbc:mysql://$mysql.full.hostname:3306/$database.name?createDatabaseIfNotExist=true

For Oracle database: jdbc:oracle:thin:@$dbhost:1521/$hive_dbname

Enter your JDBC connection string.

javax.jdo.option.ConnectionDriverName

For MySQL database: com.mysql.jdbc.Driver

For Oracle database: oracle.jdbc.driver.OracleDriver

JDBC Connection Driver Name.

javax.jdo.option.ConnectionUserName

dbusername

Enter your MySQL/Oracle user credentials from Database Requirements.

javax.jdo.option.ConnectionPassword

dbuserpassword

hive.metastore.uris

thrift://$metastore.server.full.hostname:9083

URI for client to contact metastore server. To enable HiveServer2, leave the property value empty.


 3.3. Copy the Configuration Files

On all Hive hosts replace the installed Hive configs with the modified configuration files and set appropriate permissions:

rm -rf $HIVE_CONF_DIR 
mkdir -p $HIVE_CONF_DIR 

<Copy all the modified configuration files in hive to $HIVE_CONF_DIR on all the nodes>

chown -R $HIVE_USER:$HADOOP_GROUP $HIVE_CONF_DIR/../ 
chmod -R 755 $HIVE_CONF_DIR/../ 

loading table of contents...