0

I'm trying to get the items (and their count) that were inserted in the last 24 hours using happybase. All I can think of is to use the timestamp to do that, but I couldn't figure out how to do that.

I can connect to hbase

JensG
  • 13,148
  • 4
  • 45
  • 55
XO39
  • 481
  • 2
  • 9
  • 22

1 Answers1

0

the hbase data model does not offer that efficiently without encoding the timestamp as a prefix of the row key, or using a second table as a secondary index. read up on hbase schema design, your use case is likely covered in sections on time series data.

wouter bolsterlee
  • 3,879
  • 22
  • 30
  • What about [this](http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html#setTimeRange-long-long-)? Doesn't that mean setting a time range is supported? – XO39 Dec 23 '16 at 08:27
  • the thrift api does not support that as far as i know. and filtering is HORRIBLY inefficient without a row key (or a scan over row keys). no row key + filtering results in a full table scan. v e r y slow. – wouter bolsterlee Dec 23 '16 at 08:50