hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Seigal <selek...@yahoo.com>
Subject question about scanning data
Date Sat, 11 Jun 2011 03:27:51 GMT
Hi All,

I had a question about a certain kind of query I would like to do in hbase.

I am storing records in HBase that transition from an initial state "A" to
an end state "B" .

Initially, the record I will store will look like the following ->

t1 rowid:columnFamily:A <value>

when I get a notification that the state has changed, I will write the
following value ->

t2:rowid:columnFamily:B <value>

I basically end up with two versions of the same row.

Now, I want to query for all the records that have NOT transitioned to state
B yet.

Is it possible to express a query in HBase where one can say "retrieve only
row Id values where there exists a column qualifier A but not B" ?

How can I do this ?

I tried doing the following through the hbase shell. I had the following
values stores:


I did a query for "rowid" with VERSIONS => 1. However, this gives me both A
and B qualifier values. I am only interested in values that have not yet
transitioned to B.

Is there a way to query HBase only for the highest timestamp regardless of
the value of the column qualifier ? In the above example, the highest
timestamp for "rowid" is t2 with column qualifier B, but I get t1 and t2
both back.

Your help is greatly appreciated.

Thank you !


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message