Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

hive databases not showing via beeline/hiveserver2

avatar
Contributor

Hi experts,

I am trying to upgrade my current hive version from 1.2 to 2.3.8.

I am able to connect to hive via hiveserver2 but when I do "show databases", there are no databases showing up.

 

0: jdbc:hive2://test02.domain.com:100> show databases;
+----------------+
| database_name |
+----------------+
+----------------+
No rows selected (0.124 seconds)
0: jdbc:hive2://test02.domain.com:100>

 

When accessing the mysql database I can see the databases in hive.

mysql> use hive;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from DBS;
+-------+-----------------------+-------------------------------------------+---------+------------+------------+
| DB_ID | DESC | DB_LOCATION_URI | NAME | OWNER_NAME | OWNER_TYPE |
+-------+-----------------------+-------------------------------------------+---------+------------+------------+
| 1 | Default Hive database | hdfs://test/apps/hive/warehouse | default | public | ROLE |
| 6 | NULL | hdfs://test/apps/hive/warehouse/test.db | test | anonymous | USER |
| 11 | NULL | hdfs://test/apps/hive/warehouse/test1.db | test1 | anonymous | USER |
+-------+-----------------------+-------------------------------------------+---------+------------+------------+
3 rows in set (0.00 sec)

 

I have already updated the mysql schema with the script provided.

mysql> select * from VERSION;
+--------+----------------+----------------------------+
| VER_ID | SCHEMA_VERSION | VERSION_COMMENT |
+--------+----------------+----------------------------+
| 1 | 2.3.0 | Hive release version 2.3.0 |
+--------+----------------+----------------------------+
1 row in set (0.00 sec)

 

When I switch back to the older version of hive 1.2, I am able to see the databases via beeline/hiveserver2.

 

Can someone please let me know what I am missing?

Any help is much appreciated.

Thanks,

1 ACCEPTED SOLUTION

avatar
Contributor

Ok seems like I had hive.security.authoization.enabled to true in the hiveserver2-site.xml but had not enabled the ranger hive plugin yet.

Once I set this property to false, I was able to see the hive databases with "show databases".

 

View solution in original post

2 REPLIES 2

avatar
Contributor

@ksuresh @mqureshi@Sunile Manjee@Shyam Sunder Rai - looping you in, any ideas on this ?

avatar
Contributor

Ok seems like I had hive.security.authoization.enabled to true in the hiveserver2-site.xml but had not enabled the ranger hive plugin yet.

Once I set this property to false, I was able to see the hive databases with "show databases".