You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two different service, the first creates the bloom filter and the other one uses it.
For the first service which creates the bloom filter, I can build an off-heap bloom filter with memory mapped file as follows.
val bloomFilter = BloomFilter.builder()
.useOffHeapMemory(true)
.withExpectedNumberOfItems(numberOfElements)
.withFalsePositiveRate(expectedFPR)
.withFileMapped(file)
.build()
Since the bloom filter bit-vector gets written in file, this file can then be stored somewhere for later usage (effectively achieving serialization).
And while using the filter, I can open this bloom filter just the same way as above and query.
However, if I need to open this file as in-memory bloom filter, the api doesn't support it.
In case of in-memory bloom filter (i.e useOffHeapMemory(false)), there is a check that file parameter in withFileMapped(file) should be null. I understand that this is a valid check, since in-memory bloom filter has nothing to do with file.
But since the library doesn't have serialization/de-serialization, how do I open a bloom filter in-memory from a serialized file ?
The text was updated successfully, but these errors were encountered:
I have two different service, the first creates the bloom filter and the other one uses it.
For the first service which creates the bloom filter, I can build an off-heap bloom filter with memory mapped file as follows.
Since the bloom filter bit-vector gets written in file, this file can then be stored somewhere for later usage (effectively achieving serialization).
And while using the filter, I can open this bloom filter just the same way as above and query.
However, if I need to open this file as in-memory bloom filter, the api doesn't support it.
In case of in-memory bloom filter (i.e
useOffHeapMemory(false)
), there is a check thatfile
parameter inwithFileMapped(file)
should be null. I understand that this is a valid check, since in-memory bloom filter has nothing to do with file.But since the library doesn't have serialization/de-serialization, how do I open a bloom filter in-memory from a serialized file ?
The text was updated successfully, but these errors were encountered: