concept bloom filter in category hadoop

This is an excerpt from Manning's book Hadoop in Practice, Second Edition.
A Bloom filter is a useful probabilistic data structure that provides membership qualities much like a set—the difference is that membership lookups only provide a definitive “no” answer, as it’s possible to get false positives. Nevertheless, they require a lot less memory compared to a HashSet in Java, so they’re well-suited to work with very large datasets.

This is an excerpt from Manning's book Hadoop in Action.
Last but not least, what if the file CustomerID415 is still too big to fit in memory? Or maybe CustomerID415 does fit in memory but it’s size makes replicating it across all the mappers inefficient. This situation calls for a data structure called a Bloom filter. A Bloom filter is a compact representation of a set that supports only the contain query. (“Does this set contain this element?”) Furthermore, the query answer is not completely accurate, but it’s guaranteed to have no false negatives and a small probability of false positives. The slight inaccuracy is the trade-off for the data structure’s compactness. By using a Bloom filter representation of CustomerID415, the mappers will pass through all customers in the 415 area code. It still guarantees the correctness of the data join algorithm. The Bloom filter will also pass a small portion of customers not in the 415 area code to the reduce phase. This is fine because those will be ignored in the reduce phase. We’ll still have improved performance by reducing dramatically the amount of traffic shuffled across the network. The use of Bloom filters is in fact a standard technique for joining in distributed databases, and it’s used in commercial products such as Oracle 11g. We’ll describe Bloom filter and its other applications in more details in the next section.
Figure 5.3. A Bloom filter is a bit array that represents a set with some probability of false positives. Objects (such as x, y, and z) are deterministically hashed into positions in the array, and those bits are set to 1. You can check whether an object is in the set or not by hashing and checking the values of those bit positions.
![]()