Saturday, 19 May 2012

Configuring Hive with Derby Database

Hi All,

A deep scroll down to the issue i have faced.

Initially while trying to configure the hive i have taken oracle database as a data-store ,Now in hive-site.xml
We need to set some parameter's and connectivity is Done .

Now once we set the path $HIVE_HOME/bin to your Path .

export PATH=$HIVE_HOME/bin:$PATH

Now Give  hive ,
Your will reach to hive terminal,to test hive working properly or not ,

hive> SHOW TABLES ;

0.345 secs,
OK
hive>
If the output comes this way then configuration is done properly.

Now, Hive says configure the dates-store only with derby database,MySQL database,PostgreSQL database .
Hive provided scripts to create tables for the mentioned databases.

Now for oracle database hive haven't provided any script,if we don't run this scripts  hive wont work properly as Datanucleaus error will come up again when we issue command SHOW TABLES to check hive configuration.

I was wondering Why can't we use Oracle Database,later understood that we need to edit the scripts which have already provided for derby,mysql,postgresql databases.But this is a bit hectic work .

=====================================
So, i went on configuring Derby database with Hive :-
=====================================

1) Download software from the site http://db.apache.org/derby/derby_downloads.html

2) Unzip the tar file which has been downloaded.

3) Copy the derbyclient.jar file to $HIVE_HOME/lib direcotry.

4) In hive-site.xml  Change the configuration parameters to configure with derby database and it is all Done.
   We can use hive with Derby database.

Will post the configuration parameters and it's values later.

Regards,
Naga

No comments:

Post a Comment