Use the following instructions to set up the Hive/HCatalog configuration files:
Extract the Hive/HCatalog configuration files.
From the downloaded
scripts.zipfile, extract the files inconfiguration_files/hivedirectory to a temporary directory.Modify the configuration files.
In the temporary directory, locate the following file and modify the properties based on your environment. Search for
TODOin the files for the properties to replace.Edit
hive-site.xmland modify the following properties:<property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://$mysql.full.hostname:3306/$database.name?createDatabaseIfNotExist=true</value> <description>Enter your JDBC connection string. </description> </property>
<property> <name>javax.jdo.option.ConnectionUserName</name> <value>$dbusername</value> <description>Enter your MySQL credentials. </description> </property>
<property> <name>javax.jdo.option.ConnectionPassword</name> <value>$dbuserpassword</value> <description>Enter your MySQL credentials. </description> </property>
Enter your MySQL credentials from Install MySQL (Optional).
<property> <name>hive.metastore.uris</name> <value>thrift://$metastore.server.full.hostname:9083</value> <description>URI for client to contact metastore server. To enable HiveServer2, leave the property value empty. </description> </property>
If you plan on storing Hive data in a columnar format, such as ORC, verify that the
hive.optimize.sort.dynamic.partitionproperty is set totrue, the default value for Hive 0.13. Enabling dynamic partitions improves Hive performance when using columnar formats.<property> <name>hive.optimize.sort.dynamic.partition</name> <value>true</value> </property>
Copy the configuration files.
On all Hive hosts create the Hive configuration directory.
rm -r $HIVE_CONF_DIR ; mkdir -p $HIVE_CONF_DIR ;
Copy all the configuration files to
$HIVE_CONF_DIRdirectory.Set appropriate permissions:
chown -R $HIVE_USER:$HADOOP_GROUP $HIVE_CONF_DIR/../ ; chmod -R 755 $HIVE_CONF_DIR/../ ;
where:
$HIVE_CONF_DIRis the directory to store the Hive configuration files. For example,/etc/hive/conf.$HIVE_USERis the user owning the Hive services. For example,hive.$HADOOP_GROUPis a common group shared by services. For example,hadoop.

