Configure Shared Hive Data and Metadata Directories for Hue
About this task
To configure shared Hive data and metadata directories for Hue:
Procedure
-
Change the
hive.metastore.uris
property as shown:<property> <name>hive.metastore.uris</name> <value>thrift://localhost:9083</value> <description> URI where clients contact Hive metastore server </description> </property>
NOTEThehive.metastore.warehouse.dir
property can keep its default value and does not need to be changed. -
Enable Hue impersonation by setting the following property to
true
.<property> <name>hive.metastore.execute.setugi</name> <value>true</value> <description> Set this property to enable Hive Metastore service impersonation in unsecure mode. In unsecure mode, setting this property to true causes the metastore to execute DFS operations using the client's reported user and group permissions. Note that this property must be set on BOTH the client and server sides. </description> </property>
-
Set the location of the
sharelib
.<property> <name>oozie.service.WorkflowAppService.system.libpath</name> <value>/oozie/share/lib</value> </property>
-
To enable the Hive Metastore service to share the embedded Derby
database, add the following property blocks to the
hive-site.xml
file on the node running hiveserver2 to point to the location of the Derby metastore:<property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:derby:;databaseName=/<local dir>/metastore_db;create=true</value> <description>JDBC connect string for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>org.apache.derby.jdbc.EmbeddedDriver</value> <description>Driver class name for a JDBC metastore</description> </property>
-
To enable the Hive Metastore service to share a MySQL database,
add the following property blocks to the
hive-site.xml
file:<property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://<ip_address>:3306/hive_11?createDatabaseIfNotExist=true</value> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.jdbc.Driver</value> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value><UserName></value> <description>Substitute the actual username</description> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value><Password></value> <description>Substitute the actual password</description> </property>