Class FilterComponent
java.lang.Object
org.apache.cassandra.io.sstable.format.FilterComponent
-
Method Summary
Modifier and TypeMethodDescriptionstatic IFilterload(Descriptor descriptor) Load bloom filter from Filter.db file.static IFiltermaybeLoadBloomFilter(Descriptor descriptor, Set<Component> components, TableMetadata metadata, ValidationMetadata validationMetadata) Optionally loads a Bloom filter.static voidsave(IFilter filter, Descriptor descriptor, boolean deleteOnFailure)
-
Method Details
-
load
Load bloom filter from Filter.db file.- Throws:
IOException
-
save
public static void save(IFilter filter, Descriptor descriptor, boolean deleteOnFailure) throws IOException - Throws:
IOException
-
maybeLoadBloomFilter
public static IFilter maybeLoadBloomFilter(Descriptor descriptor, Set<Component> components, TableMetadata metadata, ValidationMetadata validationMetadata) Optionally loads a Bloom filter. If the filter is not needed (FP chance is neglectable), it returnsFilterFactory.AlwaysPresent. If the filter is expected to be recreated for various reasons the method returnsnull. Otherwise, an attempt to load the filter is made and if it succeeds, the loaded filter is returned. If loading fails, the method returnsnull.- Returns:
FilterFactory.AlwaysPresent, loaded filter ornull(which means that the filter should be rebuilt)
-