I wish to store a count of 30-day trailing event data (e.g. # of clicks in past 30 days) and ended up reading the documentation for setTimeRange in the Increment operation. http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Increment.html#getTimeRange%28%29

I was hoping someone could clarify if it works as I'm imagining in this example scenario.

1) Current click count is 0

2) I process a click and I perform an increment operation with the time range set to minStamp = now and maxStamp = 30 days from now

3) I query for the value immediately and find it to be 1

4) Assuming no other clicks come in, if I query for the value in 31 days, it will be returned as 0

In essence, I'm looking for a way to set a TTL on my increment operation. Is this how it actually works? The documentation is a bit vague and I could imagine several other scenarios.
--
Jameson Lopp
Software Engineer
Bronto Software, Inc

Reply via email to