You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by 周梦想 <ab...@gmail.com> on 2013/01/07 04:39:48 UTC

about hbase rowkey and column name design

1. On HBase reference guide section
6<http://hbase.apache.org/book.html#schema>,
We know that rowkey design should not using Monotonically Increasing Row
Keys/Timeseries Data ,but if we need a time stamp sort data or a top list
data, how to design the row key?

2. If I want statistics users' login data. I need to get one day somebody
logins details(on what time, client info, etc.), to design like this:
rowkey                                             column
userid:date (fmt:2013-01-01)              c:time   (colum fmt c:12:38:56)
   value (client info)

example,
get 't1','zhouhh:2013-01-01'

zhouhh:2013-01-01          column=c:12:38:56
 value=2013-01-01 12:38:56:zhouhh
zhouhh:2013-01-01          column=c:13:42:58
 value=2013-01-01 13:42:58:zhouhh
...

there will be a lot of column names,but it is efficient to get one user on
one day login info.
 there are any problems?

Thanks,
Andy Zhou