public static long idealMaxKeys(long bitSize, double errorRate) {
    // The reason we need to use floor here is that otherwise we might put
    // more keys in a Bloom filter than is allowed by the target error rate.
    return (long) (bitSize * (LOG2_SQUARED / -Math.log(errorRate)));
  }
The maximum number of keys we can put into a Bloom filter of a certain size to maintain the
given error rate, assuming the number of hash functions is chosen optimally and does not even
have to be an integer (hence the "ideal" in the function name).
@return maximum number of keys that can be inserted into the Bloom filter
@see #computeMaxKeys(long, double, int) for a more precise estimate
hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterUtil.java