Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Drill query HBase table

I am using drill-embedded to execute SQL, I can see the tables in HBase. Here is the terminal output..

enter image description here But, I'm not able to perform query on them, it is the raising the following error:

 0: jdbc:drill:zk=local> SELECT * FROM students;


Error: SYSTEM ERROR: IllegalAccessError: tried to access method
com.google.common.base.Stopwatch.<init>()V from class
org.apache.hadoop.hbase.zookeeper.MetaTableLocator

[Error Id: 9c656263-c774-4aaf-a789-d4e374adb69b on localhost:31010]
(state=,code=0)

Please let me know what I have to do to perform a query on Drill, thanks in advance.

like image 472
Amit Mandal Avatar asked Oct 18 '22 21:10

Amit Mandal


2 Answers

This issue is more related to Hbase.

com.google.common.base.Stopwatch class is present in guava jar.

The constructors are changed to package private at version 17 or 18.

Default constructor of Stopwatch class became private since Guava v.17 and marked deprecated even earlier.

seems like you are using latest version of guava, you could lower the version and try again which has suitable constructor.

If you are using maven/gradle you have to adjust dependencies that to fit aforementioned way.

Please have a look at this issue HBASE-14126 which was clearly explained

like image 175
Ram Ghadiyaram Avatar answered Oct 21 '22 07:10

Ram Ghadiyaram


This worked for me:

Replace Guava 18 jar with Guava 16 jar in apache-drill-1.9.0/jars/3rdparty folder. You can find Guava 16 jar here:

https://github.com/google/guava/wiki/Release16

Source: https://blogs.perficient.com/delivery/blog/2017/05/15/how-to-configure-tableau-and-drill-to-show-data-from-hbase-hive/

like image 29
Raman Damodar Shahdadpuri Avatar answered Oct 21 '22 09:10

Raman Damodar Shahdadpuri