RRM
RRM

Reputation: 2670

How to clear the values of a key in Redis HyperLogLog

I'm using Redis implementation of HyperLogLog to count distinct values for given keys.

The keys are based on hour window. After the calendar hour changes, I want to reset the count of incoming values. I don't see any direct API for 'clearing' up the values through Jedis.

SET cannot be used here because it would corrupt the hash. Is there a way to correctly "reset" the count for a given key?

Upvotes: 3

Views: 708

Answers (1)

Itamar Haber
Itamar Haber

Reputation: 49942

Use the DEL command to delete the key, which will effectively reset the count.

Upvotes: 2

Related Questions