A shopper looks at binoculars on one retailer’s site, then compares hiking trousers on another, and sees relevant ads along the way. That single morning, as TellApart’s engineers described it in February 2011, leaves behind page views, transactions, ad impressions, ad clicks and real-time bid requests, all as separate log lines. The company was tracking tens of millions of such user events a day, and Dmitry Chechik’s post (first published on the Cloudera blog) explained how it stored them in HBase so they could be analysed offline from almost any angle.
It is one of the clearer early accounts of schema design for HBase in ad tech, and most of its reasoning still applies to wide-column and lakehouse systems today.
Four requirements most log pipelines share
The post opened with a set of needs that apply well beyond advertising.
Data arrived incrementally, roughly a day at a time, and had to be loaded that way. It was processed at very different time scales: a daily report needs one day, while a machine-learning model may need months. Some events belong together, such as a click and the impression it came from, which are logged separately but often have to be processed as a pair. And engineers needed random access by user, to see everything one person had done over time, which is the fastest way to debug a system that makes decisions about users.
Plain files on HDFS handle the first two well and the last two badly. That gap is why TellApart turned to HBase.
The HBase row key puts the user first
The design started from the row key. Each row key began with the user ID, followed by a timestamp, so that all of one user’s activity sat together in time order. Different kinds of event data lived in different columns. TellApart’s post showed the full layout as a diagram; the text makes clear that impressions, the bid requests behind them and data about advertisers each had their own columns, and that related events were stored in the same row.
That choice paid off in four distinct ways.
Joins without a reduce step
Loading one day of impressions is an ordinary MapReduce that writes each event into its row. Clicks are more interesting. Each click carries the ID of the impression it belongs to, so the loader can write the click straight into the impression’s row. That is a map-only job. The join that would normally need a shuffle and a reduce happens for free at write time, because the row key is the join key.
The same trick extends to derived data. If an offline analysis decides that a given impression led to a purchase on the advertiser’s site, the result can be written into that impression’s row, and no later job has to repeat the analysis.
Time-range reads with a RowFilter
Because the timestamp was part of the row key, a job that needed only the past month could use an HBase RowFilter with a custom comparator to accept just the rows in that range. The post noted HBase’s built-in cell timestamps as an alternative. Either way the mappers read far less data, and jobs ran much faster.
Sampling with a PrefixFilter
User IDs were generated randomly, and they formed the start of every row key. So a job that wanted a sample of users could use a PrefixFilter to accept only rows beginning with a chosen prefix. With hexadecimal IDs, a one-character prefix gives you roughly a sixteenth of all users, with no extra sampling code and no bias.
This is the side detail that tends to get forgotten. Random user IDs are usually chosen to spread write load across regions of the table; here the same property also gave the analysts free, uniform sampling.
Column selection and value filters
Columns gave a second axis. A job that needed impressions together with their bid requests read both columns; a job that needed only impressions read one. With the advertiser’s ID stored in its own advertiser_id column, a SingleColumnValueFilter could return only the rows for one advertiser.
One scan to see a user’s whole history
Outside batch jobs, the design made a particular kind of debugging trivial. To see everything one user had done, an engineer issued a Scan over the key range starting with that user’s ID. The answer came back at once, and the same column filters could narrow it further. TellApart had modified the HBase shell so it would deserialise and format the stored data, which turned raw bytes into something readable at the prompt.
For a company whose product was a per-user decision (whether to bid, how much, which ad), being able to pull a user’s full event trail in seconds was not a convenience. It was how bugs in the decision logic got found.
The engineers also adapted HBase to the rest of their stack. They extended the existing Cascading.HBase module to support any Hadoop serialisation, so Cascading jobs could read and write Thrift objects or other Hadoop Writables from HBase just as they would from files. That code went into the company’s open-source TellApart-Hadoop-Utils project.
What held up and what did not
The schema reasoning has aged well. Putting the entity you query by at the front of the key, co-locating related events in one row and pushing filters to the storage layer are still the basic moves for Bigtable, HBase and Cassandra, and the user-first row key has a direct descendant in partitioning and clustering choices for lakehouse tables.
The HBase operations story aged less well. HBase rewards careful tuning of region splits, compactions and garbage collection, and a cluster that is fine at tens of millions of events a day can need real attention at billions. Hot-spotting is the usual trap: if the key started with a timestamp instead of a random user ID, every write would land on the same region. TellApart’s key avoided that by design, which is worth stating because so many first HBase schemas get it wrong.
TellApart itself kept moving in this direction. Its later Tyra pipeline for training user models stored daily per-user summaries in flat files, and the engineers wrote that they were considering HBase to make that user-centric data easier to work with.
The same design in 2026
You would build the analytical half differently today. Raw events would land in object storage as Apache Iceberg or Delta Lake tables, partitioned by date and clustered or sorted by user ID. Spark, Trino or DuckDB would do the time-range and column pruning that RowFilter and column selection did, and Z-ordering or sort keys would give similar locality. Sampling by hashed user ID still works the same way, and still costs nothing.
The random-access half is where a key-value store keeps its place. For “show me everything this user did”, teams use Bigtable (the system HBase was modelled on), DynamoDB, Cassandra or ScyllaDB, with a row key that starts with the user ID exactly as TellApart’s did. HBase is still maintained by the Apache project and still runs at large companies, but few teams would pick it for a new deployment over a managed service.
The privacy context has also changed. A table keyed by user across many retailers’ sites is precisely the kind of cross-site profile that GDPR, CCPA and browser changes have made harder to build and justify, and today a design like this needs retention limits and deletion by user ID built in from the first day. Ironically, the user-first row key makes that easy: deleting one person means deleting one key range. If you want to see how such data fed real-time personalisation, or how jobs over it were launched with mrjob, those pieces pick up the thread.
Questions readers ask
Why put the user ID before the timestamp in an HBase row key?
Starting the key with the user ID keeps all of one person's activity together in time order, so a single scan returns their whole history. Because TellApart's user IDs were random, writes also spread across the table instead of piling onto one region. A key that began with a timestamp would send every new write to the same region, the hot-spotting trap many first HBase schemas fall into.
How can a random user ID give you a free sample of users?
Every row key began with a randomly generated user ID, so a PrefixFilter that accepts only keys starting with a chosen prefix selects an unbiased slice of users. With hexadecimal IDs, a single-character prefix returns roughly one sixteenth of all users. No extra sampling code is needed. Sampling by hashed user ID works the same way in lakehouse tables today, and it still costs nothing.
Who wrote the HBase post, and where did the Cascading code end up?
Dmitry Chechik wrote it in February 2011, and it first appeared on the Cloudera blog. TellApart's engineers extended the existing Cascading.HBase module to support any Hadoop serialisation, so Cascading jobs could read and write Thrift objects or other Hadoop Writables from HBase the same way they would from files. That code went into the company's open-source TellApart-Hadoop-Utils project. They also modified the HBase shell to deserialise and format stored data.
How does a user-keyed HBase table handle deleting one person's data?
Under GDPR and the CCPA, a table keyed by user across many retailers' sites is exactly the kind of cross-site profile that is now hard to justify, so retention limits and deletion by user ID belong in the design from the start. The user-first row key helps here. Because all of one person's events share a key prefix, removing that person comes down to deleting a single key range.