Support Questions

Find answers, ask questions, and share your expertise

HiveServer2 is up - Beeline not showing up databases/tables

avatar
Expert Contributor

Hello - i've HiveServer2 enabled on my cluster, and i'm able to connect to the cluster using Beeline.

However when i run the command - show tables OR show databases, it does not shown up.

However, when i launch the Hive CLI, i'm able to see the tables & database.

Any ideas on what is causing this ?

---------------------------------------------------------

ON HiveCLI :

[hive@nwk2-bdp-hadoop-06 bin]$ hive

Logging initialized using configuration in file:/etc/hive/2.5.3.0-37/0/hive-log4j.properties

hive>

> show tables;

OK

factsales

factsales_tmp

ON BEELINE :

beeline -u 'jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.apple.com:10000/'

Connecting to jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.apple.com:10000/

Connected to: Apache Hive (version 1.2.1000.2.5.3.0-37)

Driver: Hive JDBC (version 1.2.1000.2.5.3.0-37)

Transaction isolation: TRANSACTION_REPEATABLE_READ

Beeline version 1.2.1000.2.5.3.0-37 by Apache Hive

0: jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.ap> show tables

0: jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.ap> show databases

1 ACCEPTED SOLUTION

avatar
Contributor

@Karan Alang Looks like you are missing a semicolon(;) at the end of the query.

View solution in original post

6 REPLIES 6

avatar
Expert Contributor

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

avatar
Super Guru

@Karan Alang

Try removing single quotes from the url. If that doesn't help add default database as the db you are connecting to. You can later change your db.

avatar
Expert Contributor

@mqureshi- thx, however that did not help ..

Any ideas ? How do i debug this ?

---------------------------------

[hive@nwk2-bdp-hadoop-06 ~]$ beeline -u jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.apple.com:10000 Connecting to jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.apple.com:10000 Connected to: Apache Hive (version 1.2.1000.2.5.3.0-37) Driver: Hive JDBC (version 1.2.1000.2.5.3.0-37) Transaction isolation: TRANSACTION_REPEATABLE_READ Beeline version 1.2.1000.2.5.3.0-37 by Apache Hive 0: jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.ap> use default 0: jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.ap> show tables 0: jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.ap>

[root@nwk2-bdp-hadoop-06 ~]# beeline -u jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.apple.com:10000/default Connecting to jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.apple.com:10000/default Connected to: Apache Hive (version 1.2.1000.2.5.3.0-37) Driver: Hive JDBC (version 1.2.1000.2.5.3.0-37) Transaction isolation: TRANSACTION_REPEATABLE_READ Beeline version 1.2.1000.2.5.3.0-37 by Apache Hive 0: jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.ap> show tables 0: jdbc:hive2://nwk2-bdp-hadoop-07.gdcs-qa.ap>

avatar
Contributor

@Karan Alang Looks like you are missing a semicolon(;) at the end of the query.

avatar
Super Guru

@Karan AlangI agree. I tried and was duplicate your issue when I don't have a semi colon. I wish beeline would complain but apparently it doesn't. Did this resolve your issue?

avatar
Expert Contributor

@ksuresh, @mqureshi

- thanks, that fixed this issue !