- Home
- Unravel 4.7.9.x Documentation
- Configurations
- Data Page
- Hive Metastore
- Configuring Hive Metastore (On-prem)
Configuring Hive Metastore (On-prem)
Unravel should connect to your Hive Metastore to populate the Data page by analyzing your table usage with Hive query information. Unravel Server collects information through the Hive API, which is similar to the beeline CLI and uses the JDBC database connection protocol. Data
This topic takes you through the steps to connect Unravel to Hive Metastore. If you configure external hive metastore EMR are using Oracle, you also have to configure it to grant Unravel access.Configuring access for an Oracle database
Copy database jar for unity catalog metastore configuration
Ensure that the database jar file for MySQL, MariaDB, or Oracle DB is copied to the following location before you configure Unity Catalog metastore.
<Unravel installation directory>
/unravel/share/java/
For example:
/opt/unravel/share/java/
Hive metastore connection can be set with auto-configuration or manual configuration in a single cluster and multi-cluster environments.
Connecting to Hive metastore in a single cluster environment
In a single cluster environment, the Hive metastore connection can be set either with auto-configuration or manual configuration:
Stop Unravel
<Unravel installation directory>
/unravel/manager stopRun auto-configuration.
<unravel_installation_directory>
/unravel/manager config autoNote
The Hive metastore database password can be recovered automatically only for a cluster manager with an administrative account. Otherwise, it must be set manually.
To set the Hive metastore password manually, run the following command. If the password is omitted, it will be prompted without an echo.
CLUSTER_KEY
is the name of the cluster where you set the Hive configurations.<Unravel installation directory>
/unravel/manager config hive metastore password<CLUSTER_KEY>
<HIVE_KEY>
<password>
Example:
/opt/unravel/manager config hive metastore password cluster1 hive P@SsWorD
Apply the changes.
<Unravel installation directory>
/unravel/manager config applyStart Unravel
<Unravel installation directory>
/unravel/manager startGo to Jobs > Applications page to confirm that Hive queries are displayed. Approximately twenty-four hours after configuration the Data page displays a list of your Hive Metastore tables along with their KPIs and other details.Data
Stop Unravel
<Unravel installation directory>/unravel/manager stop
Run the following command to connect to Hive metastore.
Tip
Ensure to download the compatible JDBC connector jar for your database and place the connector JAR at
<Unravel Installation directory>/unravel/share/java
.PostgreSQL JDBC connector is already bundled with Unravel.
<Unravel installation directory>
/unravel/manager config hive metastore set<CLUSTER_KEY>
<HIVE_KEY>
<DRIVER>
<URL>
<USER>
<PASSWORD>
For example:
/opt/unravel/manager config hive metastore set my-cluster hive com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/database user Pa$$c0De
This sets the following metastore database information:
JDBC driver: JDBC Driver class name for the data store containing the metadata.
For example:
MySQL: com.mysql.jdbc.Driver
PostgreSQL: org.postgresql.Driver
Oracle: oracle.jdbc.driver.OracleDriver
Microsoft: com.microsoft.sqlserver.jdbc.SQLServerDriver
JDBC URL: JDBC connection string in the format expected by the driver.
For example:
MySQL: jdbc:mysql://host:port/database
PostgreSQL: jdbc:postgresql://host:port/database
Oracle: jdbc:oracle:thin:@database:port:sid
Microsoft: jdbc:sqlserver://hostname:port;databaseName=database
Username: Username used to access the data store.
Password: Password used to access the data store.
Apply the changes.
<Unravel installation directory>/unravel/manager config apply
Start Unravel
<Unravel installation directory>/unravel/manager start
Connecting to Hive metastore in multi-cluster environment
In a multi-cluster environment, the Hive metastore connection can be set either with auto-configuration or manual configuration:
Stop Unravel
<Unravel installation directory>
/unravel/manager stopRun auto-configuration.
Run the following command from the core node:
<unravel_installation_directory>
/unravel/manager config edge auto<EDGE_KEY>
Example:
/opt/unravel/manager config edge auto my-edge
Run the following command from the core node, if the core node is directly monitoring the Hadoop cluster:
<unravel_installation_directory>
/unravel/manager config auto
Set the Hive metastore password. The Hive metastore database password can be recovered automatically only for a cluster manager with an administrative account. Otherwise, it must be set manually.
Run the manager config edge show command to get the
<EDGE_KEY>
,<HIVE_KEY>
, and<CLUSTER_KEY>
, which must be provided when you set the Hive metastore password.<EDGE_KEY>
is the label you provide to identify the edge node when you set the cluster.CLUSTER_KEY
is the name of the cluster where you set the Hive configurations.<HIVE_KEY>
is the definition of the Hive service. In the output of the manager config edge show command, this is shown as <SERVICE_KEY>
Run the following command on the core node to set the password:
<Unravel installation directory>
/unravel/manager config edge hive metastore passwordEDGE_KEY>
<CLUSTER-KEY>
<HIVE-KEY>
<password>
Example:
/opt/unravel/manager config edge hive metastore password local-node cluster1 hive P@SsWorD
If the core node is monitoring the Hadoop cluster directly, run the following command from the core node to set the password:
<Unravel installation directory>
/unravel/manager config hive metastore password<CLUSTER_KEY>
<HIVE_KEY>
<password>
Example:
/opt/unravel/manager config edge hive metastore password clluster1 hive P@SsWorD
Apply the changes.
<Unravel installation directory>
/unravel/manager config applyStart Unravel
<Unravel installation directory>
/unravel/manager startGo to Jobs > Applications page to confirm that Hive queries are displayed. Approximately twenty-four hours after configuration the Data page displays a list of your Hive Metastore tables along with their KPIs and other details.Data
Stop Unravel
<Unravel installation directory>
/unravel/manager stopRun the manager config edge show command to get the
<EDGE_KEY>
,<HIVE_KEY>
, and<CLUSTER_KEY>
, which must be provided when you connect to the Hive metastore.<EDGE_KEY>
is the label you provide to identify the edge node when you set the cluster.CLUSTER_KEY
is the name of the cluster where you set the Hive configurations.<HIVE_KEY>
is the definition of the Hive service. In the output of the manager config edge show command, this is shown as <SERVICE_KEY>.
Run the following command to connect to Hive metastore.
Tip
Ensure to download the compatible JDBC connector jar for your database and place the connector jar at
<Unravel Installation directory>/unravel/share/java
.<Unravel installation directory>
/unravel/manager config edge hive metastore set<EDGE_KEY>
<CLUSTER_KEY>
<HIVE_KEY>
<DRIVER>
<URL>
<USER>
<PASSWORD>
Example:
/opt/unravel/manager config edge hive metastore set my-edge my-cluster hive com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/database user passcode
This sets the following metastore database information:
JDBC driver: JDBC Driver class name for the data store containing the metadata.
For example:
MySQL: com.mysql.jdbc.Driver
PostgreSQL: org.postgresql.Driver
Oracle: oracle.jdbc.driver.OracleDriver
Microsoft: com.microsoft.sqlserver.jdbc.SQLServerDriver
JDBC URL: JDBC connection string in the format expected by the driver.
For example:
MySQL: jdbc:mysql://host:port/database
PostgreSQL: jdbc:postgresql://host:port/database
Oracle: jdbc:oracle:thin:@database:port:sid
Microsoft: jdbc:sqlserver://hostname:port;databaseName=database
Username: Username used to access the data store.
Password: Password used to access the data store.
Apply the changes.
<Unravel installation directory>
/unravel/manager config applyStart Unravel
<Unravel installation directory>
/unravel/manager start