Hbase / Hadoop Query Help

zechariahs picture zechariahs · Sep 7, 2008 · Viewed 19.4k times · Source

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?

Answer

Sean picture Sean · Sep 7, 2008

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.