Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Strange issue with beeline

avatar
Expert Contributor

I was working with beeline for quite a long time and this morning I got a strange issue. When I executed the below simple beeline command I didn't get any output.

beeline -u jdbc:hive2://10.241.1.8:10000 -f testarea/hive.hql

here is what I get

$ beeline -u jdbc:hive2://10.241.1.8:10000 -f testarea/hive.hql 
scan complete in 3ms 
Connecting to jdbc:hive2://10.241.1.8:10000 
Connected to: Apache Hive (version 0.13.1-cdh5.3.6) 
Driver: Hive JDBC (version 0.13.1-cdh5.3.6) 
Transaction isolation: TRANSACTION_REPEATABLE_READ 
0: jdbc:hive2://10.241.1.8:10000> select count (*) from active_139;
Closing: 0: jdbc:hive2://10.241.1.8:10000

the hive.hql contains the below hive query

select count (*) from active_139;

However if I execute the same hive query from beeline it works.

$ beeline -u jdbc:hive2://10.241.1.8:10000 -e 'select count (*) from active_139;'
scan complete in 3ms
Connecting to jdbc:hive2://10.241.1.8:10000
Connected to: Apache Hive (version 0.13.1-cdh5.3.6)
Driver: Hive JDBC (version 0.13.1-cdh5.3.6)
Transaction isolation: TRANSACTION_REPEATABLE_READ
+---------+--+
|   _c0   |
+---------+--+
| 121837  |
+---------+--+
1 row selected (23.827 seconds)
Beeline version 0.13.1-cdh5.3.6 by Apache Hive
Closing: 0: jdbc:hive2://10.241.1.8:10000

Any body got a clue on this?

1 ACCEPTED SOLUTION

avatar
Expert Contributor

After a lot of trial and error I found the issue. The hive.hql file was expecting a new line at the end of the query which is a bug in Hive 0.13.1 and has been fixed in hive 0.14.0.

View solution in original post

1 REPLY 1

avatar
Expert Contributor

After a lot of trial and error I found the issue. The hive.hql file was expecting a new line at the end of the query which is a bug in Hive 0.13.1 and has been fixed in hive 0.14.0.