Closed ChrisCurtin closed 10 years ago
It looks like this is an issue with Java's bitset functions and Redis:
https://github.com/xetorthio/jedis/issues/301
Solution (if anyone else comes across this):
There is an overwriteBitSet method on the RedisBitSet, so now it is possible to call redisFilter.getRedisBitSet().overwriteBitSet(memoryFilter.getBitSet())
to overwrite all bits in a single call. The issue with reversed bytes is also solved.
Best,
Felix
Hi,
I want to build the filter locally then push it to Redis to avoid the huge # of round trips. However when I do this by getting the BitSet via 'getBitSet' and calling overwrite none of my items are found.
What is the correct way to copy from a local BloomFilter to Redis-backed?
Thanks,
Chris
Source code below. Parameters:
All the contains() calls are failing.
public static void main(String[] args) { String invalidPath = args[0]; long suppressedListSize = Long.parseLong(args[1]); long numItemsToAdd = Long.parseLong(args[2]);