hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Meil <doug.m...@explorysmedical.com>
Subject Re: Why use "Reverse Timestamp" as the Row Key?
Date Fri, 22 Jul 2011 12:08:43 GMT

It's so that you can get the most recent entry with a Scan.  Assuming that
the key-structure (as explained in the book) is something like
<thing><rev-timestamp>.  And you are trying to quickly find the most
recent entry for <thing>.

On 7/22/11 3:18 AM, "edward choi" <mp2893@gmail.com> wrote:

>I was studying Hbase with "Hadoop: The Definitive Guide".
>There was a schema example that had as the row key, "Group Id + Reverse
>This way the same groups will be located near one another in the table.
>Plus, within the same group, rows will be sorted so that the most recently
>inserted row will be located at the first.
>The part I don't understand is, what is the advantage of using "Reverse
>Timestamp" instead of just "Timestamp"?
>Why place the newest row on the top?
>I thought in Hbase, keys are searched by binary search. And in binary
>search, the chronological order has no effect (at least that's how I
>understand it).
>So why put an extra step to reverse the timestamp?
>Any explanation will be much appreciated.

View raw message