Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hbase query best practice

Solved Go to solution

Hbase query best practice

New Contributor

As Hbase has no its build-in query language, I'm wondering the best practice of hbase query..by spark, Phoenix, solar? We need select, group by, join operations mostly. How to decide which technique is right for our case?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Hbase query best practice

@Cui Lin

If you have to perform huge scans and joins between big tables, you can also consider creating hive tables using hbase storage handler and using hive to perform your sql queries.

See examples below:

https://community.hortonworks.com/questions/1558/bestoptimized-way-to-move-data-from-phoenix-to-hiv....

https://community.hortonworks.com/questions/1652/how-can-i-query-hbase-from-hive.html

6 REPLIES 6

Re: Hbase query best practice

Re: Hbase query best practice

@Cui Lin

and you can configure Squirel or DBVisualizer using phoenix jdbc driver.

http://www.dbvis.com/doc/8.0/doc/ug/installDriver/installDriver.html

Highlighted

Re: Hbase query best practice

New Contributor

Apache Phoenix is currently the only way to query HBase using SQL.

Re: Hbase query best practice

@Cui Lin

If you have to perform huge scans and joins between big tables, you can also consider creating hive tables using hbase storage handler and using hive to perform your sql queries.

See examples below:

https://community.hortonworks.com/questions/1558/bestoptimized-way-to-move-data-from-phoenix-to-hiv....

https://community.hortonworks.com/questions/1652/how-can-i-query-hbase-from-hive.html

Re: Hbase query best practice

New Contributor

I tried Phoenix and installed it according to the instruction, but I got the following error message:

[root@cui-hdp-02 phoenix]# sqlline.py localhost Setting property: [isolation, TRANSACTION_READ_COMMITTED] issuing: !connect jdbc:phoenix:localhost none none org.apache.phoenix.jdbc.PhoenixDriver Connecting to jdbc:phoenix:localhost

15/12/15 14:17:14 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

15/12/15 14:17:14 WARN impl.MetricsConfig: Cannot locate configuration: tried hadoop-metrics2-phoenix.properties,hadoop-metrics2.properties 15/12/15 14:17:15 ERROR client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.

My hbase's znode is by default defined as /hbase-unseure. How can i change phoenix to use current znode, instead of /hbase?

Re: Hbase query best practice

@Cui Lin Could you accept one of the answers related to originial question and post this as new thread? It will help to keep the flow clean.