Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hbase / Hadoop Query Help

Tags:

hadoop

hbase

I'm working on a project with a friend that will utilize Hbase to store it's data. Are there any good query examples? I seem to be writing a ton of Java code to iterate through lists of RowResult's when, in SQL land, I could write a simple query. Am I missing something? Or is Hbase missing something?

like image 529
zechariahs Avatar asked Sep 07 '08 02:09

zechariahs


People also ask

Does HBase support SQL query?

HBase is most effectively used to store non-relational data, accessed via the HBase API. Apache Phoenix is commonly used as a SQL layer on top of HBase allowing you to use familiar SQL syntax to insert, delete, and query data stored in HBase.

What query language does HBase use?

HBase is an open-source non-relational distributed database modeled after Google's Bigtable and written in Java.


1 Answers

I think you, like many of us, are making the mistake of treating bigtable and HBase like just another RDBMS when it's actually a column-oriented storage model meant for efficiently storing and retrieving large sets of sparse data. This means storing, ideally, many-to-one relationships within a single row, for example. Your queries should return very few rows but contain (potentially) many datapoints.

Perhaps if you told us more about what you were trying to store, we could help you design your schema to match the bigtable/HBase way of doing things.

For a good rundown of what HBase does differently than a "traditional" RDBMS, check out this awesome article: Matching Impedance: When to use HBase by Bryan Duxbury.

like image 196
Sean Avatar answered Sep 22 '22 00:09

Sean