3

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?

RRM
  • 2,495
  • 29
  • 46

1 Answers1

2

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

Itamar Haber
  • 47,336
  • 7
  • 91
  • 117