Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # user >> Why use "Reverse Timestamp" as the Row Key?


Copy link to this message
-
Why use "Reverse Timestamp" as the Row Key?
Hi,
I was studying Hbase with "Hadoop: The Definitive Guide".
There was a schema example that had as the row key, "Group Id + Reverse
Timestamp."
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.

Ed.
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB