Manoj
Manoj

Reputation: 21

Unable to find the hive table through command line which is created using hue in cloudera quickstart VM

I am using cloudera quickstart VM. Through hue, I created an Oozie job and created a hive table using this job. Job execution is successful. When I open a terminal from desktop and connect to hive, I don't see table in there.

I am aware of concept that in standalone cluster, hive metastore gets created to the location from where we access the hive. e.g If I open terminal from Desktop and create a hive table tab1 then hive metadata will be created at desktop only. And If i launch terminal from other directory except Desktop, then i will be unable to see tab1 in hive.

Same is the case here. Oozie might be launching hive from some different directory location and hence I am unable to see the table from Desktop.

Can somebody please help me how can i view the table ?

Upvotes: 0

Views: 153

Answers (1)

David דודו Markovitz
David דודו Markovitz

Reputation: 44911

This does not seem right.
Cloudera quickstart comes with a MySQL metastore.

bash-4.1$ </etc/hive/conf/hive-site.xml grep -A1 jdo

    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://127.0.0.1/metastore?createDatabaseIfNotExist=true</value>
--
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>com.mysql.jdbc.Driver</value>
--
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>hive</value>
--
    <name>javax.jdo.option.ConnectionPassword</name>
    <value>cloudera</value>
bash-4.1$ 

bash-4.1$ mysql -uhive -pcloudera
mysql> select tbl_name from metastore.TBLS;

+----------------------------+
| tbl_name                   |
+----------------------------+
| my_tbl_1                   |
| my_tbl_2                   |
| my_tbl_3                   |
+----------------------------+
3 rows in set (0.10 sec)

mysql> 

Upvotes: 1

Related Questions