Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Instead of storing each location point in a single row, you could store each location in it's own column, with a one year TTL. This is a similar idea to how OpenTSDB does it's bucketing of metrics, where for a certain time window each reading of a metric is stored in a separate column.</p> <p>This schema would allow you to scan over all of your users and inside of your scanning job, manually filter out dates that you don't care about. This is still a full table scan, but only over the set of your users, not the set of all your locations.</p> <p>This schema also has the advantage of allowing just a single get or small scan, see below, for a user to access their entire location history.</p> <p>The downside of this schema revolves around the size of your rows for each user. If each user has a few hundred or thousand data points, you should be ok. But, if each user has millions of locations, your row sizes could grow to the same size as your region. Since HBase never splits rows across regions, you would wind up with regions consisting of a single row, which is not optimal.</p> <p>To fix this, you need to implement your own bucketing of checkin data for each user like OpenTSDB does. Say each bucket is uid+weekOfTheYear+year. The bucket granularity is heavily dependent on how often users are adding location data. This creates multiple rows per user, and thus requires a scan over each bucket for a given user. To access data for a specific date range, just use the timestamp filtering builtin to Scanners.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload