public static String formatStats(BloomFilterBase bloomFilter) {
    StringBuilder sb = new StringBuilder();
    long k = bloomFilter.getKeyCount();
    long m = bloomFilter.getMaxKeys();

    sb.append("BloomSize: " + bloomFilter.getByteSize() + STATS_RECORD_SEP);
    sb.append("No of Keys in bloom: " + k + STATS_RECORD_SEP);
    sb.append("Max Keys for bloom: " + m);
    if (m > 0) {
      sb.append(STATS_RECORD_SEP + "Percentage filled: "
        + NumberFormat.getPercentInstance().format(k * 1.0 / m));
    }
    return sb.toString();
  }
A human-readable string with statistics for the given Bloom filter.
@param bloomFilter the Bloom filter to output statistics for;
@return a string consisting of "&lt;key&gt;: &lt;value&gt;" parts separated by
        {@link #STATS_RECORD_SEP}.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterUtil.java