Are you trying to count the number of distinct actions seen per user? The
HyperLogLog algorithm was designed for that purpose If you are using Redis
it already has an in-built HyperLogLog data structure.

I've built a variety of different data structures and used them in Storm.
What exactly is the problem you're having?


On Wed, Jul 16, 2014 at 10:50 AM, Sa Li <[email protected]> wrote:

> Hi, All
>
> I like to develop a bitmap to count uniques in bolt, the process is like
> this, spout take the stream from kafka, emit to bolt, bolt will output an
> online user bitmap with predefined time window.  My plan is to use bitmap
> structure in redis, say set bit(key, offset, value), where key is user
> action and time window, offset is useriD, value is 1. I know there is a
> storm-redis-pubsub checkin in storm-contrib, but never use it,  i wonder if
> anyone ever done or thinking to make bitmap in storm.
>
> thanks
>
> Alec.

Reply via email to