public static BloomFilter build(long expectedEntries, double fpp) {
    checkArgument(expectedEntries > 0, "expectedEntries should be > 0");
    checkArgument(fpp > 0.0 && fpp < 1.0, "False positive probability should be > 0.0 & < 1.0");
    BloomFilter bloomFilter = new BloomFilter();
    int nb = optimalNumOfBits(expectedEntries, fpp);
    // make 'm' multiple of 64
    bloomFilter.numBits = nb + (Long.SIZE - (nb % Long.SIZE));
    bloomFilter.numHashFunctions = optimalNumOfHashFunctions(expectedEntries, bloomFilter.numBits);
    bloomFilter.bitSet = BitSet.build(bloomFilter.numBits);
    return bloomFilter;
  }
BloomFilter is a probabilistic data structure for set membership check. BloomFilters are
highly space efficient when compared to using a HashSet. Because of the probabilistic nature of
bloom filter false positive (element not present in bloom filter but test() says true) are
possible but false negatives are not possible (if element is present then test() will never
say false). The false positive probability is configurable (default: 5%) depending on which
storage requirement may increase or decrease. Lower the false positive probability greater
is the space requirement.
Bloom filters are sensitive to number of elements that will be inserted in the bloom filter.
During the creation of bloom filter expected number of entries must be specified. If the number
of insertions exceed the specified initial number of entries then false positive probability will
increase accordingly.

Internally, this implementation of bloom filter uses Murmur3 fast non-cryptographic hash
algorithm. Although Murmur2 is slightly faster than Murmur3 in Java, it suffers from hash
collisions for specific sequence of repeating bytes. Check the following link for more info
https://code.google.com/p/smhasher/wiki/MurmurHash2Flaw
storage-api/src/java/org/apache/hive/common/util/BloomFilter.java