hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shengjie Min <kelvin....@gmail.com>
Subject HBASE - select distinct query against the rowkey
Date Thu, 20 Dec 2012 14:55:46 GMT
I have a hbase table called "users", rowkey consists of three parts:

   1. userid
   2. messageid
   3. timestamp

rowkey looks like: ${userid}_${messageid}_${timestamp}

Given I can hash the userid and make the length of the field fixed, is
there anyway I can do a query like SQL query:

select distinct(userid) from users

If rowkey doesn't allow me to query like this, does that mean I need to
create a separated table just contains all the user ids? I guess if I do
something like that, it won't be atomic anymore when I insert a record in,
becoz I am dealing with two tables without transaction.
-- 
All the best,
Shengjie Min

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