- Home
- Unravel 4.5 Documentation
- Advanced topics
- Configurations
- Connecting to the Hive Metastore
- Configuring a Hive Metastore
Configuring a Hive Metastore
In order for the Reports > Data Insights tab to populate correctly you must configure the Hive Metastore Access parameters. You also have the option to configure the JDBC parameters managing JDBC pooling.
ahve to have read access to hive metastopre data base
Download the right JDBC connector JAR for your database:
If you're using MySQL as the Hive Metastore database, download the MySQL JDBC connector JAR from MySQL Download ConnectorJ.
If you're using Oracle as the Hive Metastore database, download the Oracle JDBC connector JARs
ojdbc7.jar
andojdbc6.jar
from Oracle Database 12c Release 1 JDBC Driver Downloads.Note
Make sure the
unravel
account has read permission.
ADD WHERE THE JAR GOES
In
/usr/local/unravel/etc/unravel.properties
, edit the following properties:Property/Description
Set by user
Unit
Default
javax.jdo.option.ConnectionDriverName
JDBC Driver class name for the data store containing the metadata.
Examples:
MySQL:
com.mysql.jdbc.Driver
Oracle:
oracle.jdbc.driver.OracleDriver
Microsoft:
com.microsoft.sqlserver.jdbc.SQLServerDriver
Required
string
-
javax.jdo.option.ConnectionPassword
Password used to access the data store.
Required
string
-
javax.jdo.option.ConnectionUserName
Username used to access the data store.
Required
string
-
javax.jdo.option.ConnectionURL
JDBC connection string for the data store containing the metadata of the form: jdbc:
DB_Driver
://HOST
:PORT
/hiveExample:
Oracle:
jdbc:oracle:thin:@prodHost:1521:ORCL
Microsoft:
jdbc:sqlserver://
jdbc_url
Requited
string
(URL)
-
Tip
To locate the values for the above properties see Obtaining Hive Metastore details.
In other words,
javax.jdo.option.ConnectionURL=jdbc:
drivertype
://hive-metastore-database-host
/hive javax.jdo.option.ConnectionDriverName=driverclass
javax.jdo.option.ConnectionPassword=hive-metastore-database-password
javax.jdo.option.ConnectionUserName=hive-metastore-database-user
For example,
javax.jdo.option.ConnectionURL=jdbc:mysql://congo.unraveldata.com/hive javax.jdo.option.ConnectionDriverName=com.mysql.jdbc.Driver javax.jdo.option.ConnectionUserName=hive javax.jdo.option.ConnectionPassword=hadoop
SRETH THINKS THIS SHOULD BE INTERNAL
You may optionally configure the following properties to manage the Hive Metastore JDBC connection pooling. Unravel uses the c3p0 library to manage the pooling.
Property/Description
Set by user
Unit
Default
com.unraveldata.metastore.db.c3p0.acquireRetryAttempts
Controls how many times c3p0 tries to obtain an connection from the database before giving up.
Important
For MapR you must set this value to 0.
count
30
com.unraveldata.metastore.db.c3p0.acquireRetryDelay
Controls how much waiting time is between each retry attempts in milliseconds.
Important
For MapR you must set this value to 0.
ms
1000
com.unraveldata.metastore.db.c3p0.breakafteracquirefailure
Allows you to mark data source as broken and permanently be closed if a connection cannot be obtained from database.
The default value is false.
boolean
false
com.unraveldata.metastore.db.c3p0.maxconnectionage
The maximum number of seconds any connections were forced to be released from the pool.
If the default value (0) is used the connections will never be released.
sec
0
com.unraveldata.metastore.db.c3p0.maxidletimeexcessconnections
The number of seconds that connections are permitted to remain idle in the pool before being released.
If the default value (0) is used the connections will never be released.
sec
0
com.unraveldata.metastore.db.c3p0.maxpoolsize
The maximum connections in the connection pool.
count
5
com.unraveldata.metastore.db.c3p0.idleconnectiontestperiod
0
com.unraveldata.metastore.databasePattern
string
dname*
com.unraveldata.print.metastore.stats
boolean
false
com.unraveldata.metastore.use.jdbc
Enables read-only access to retrieve data from HiveMetastore with simple JDBC calls.
true
: read-only access for HiveMetastore data retrieval.false
: read-write access for HiveMetastore data retrieval.boolean
false
Restart Unravel Server.
sudo /etc/init.d/unravel_all.sh restart
Go to Unravel UI's Applications > Applications page to confirm that Hive queries are displayed. Approximately twenty-four hours after configuration the Reports > Data Insights > Details page displays a list of your Hive Metastore tables along with their KPIs and other details.