Hive JDBC metastore

By | April 17, 2017

Hive JDBC metastore

In hive the default database for storing metadata is derby database but limitation to this is it only serves only one client request at a time, it will not handle multiple client requests.

To solve this limitation hive also provides connectivity with JDBC driver that is hive can store all its metadata related information like table schema etc.

Below is a sample MySQL configuration which you can use it in hive-site.xml file.

You can use this configuration inside <configuration> tag.




Example for addition JDBC connection URL

<property>

            <name>javax.jdo.option.ConnectionURL</name>

            <value>jdbc:mysql://toodey-server.com/myhive_meta?createDatabaseIfNotExist=true </value>

<property>

After addition the connection URL in configuration file we need to also specify the driver name into another property tab so bear with me.

<property>

            <name>javax.jdo.option.ConnectionDriverName</name>

            <value>com.mysql.jdbc.Driver</value>

<property>

After adding the driver name now we need to pass username to connect to the database of MySQL. This is your MySQL username and password.

<property>

            <name>javax.jdo.option.ConnectionUserName</name>

            <value>myUsername</value>

<property>

After putting your MySQL username now provide password as well to make it work.

<property>

            <name>javax.jdo.option.ConnectionPassword</name>

            <value>myPassword</value>

<property>

RECOMMENDED BOOK: