public static byte[] getBloomFilterParam(BloomType bloomFilterType, Configuration conf)
    throws IllegalArgumentException {
    byte[] bloomParam = null;
    String message = "Bloom filter type is " + bloomFilterType + ", ";
    if (bloomFilterType.equals(ROWPREFIX_FIXED_LENGTH)) {
      String prefixLengthString = conf.get(PREFIX_LENGTH_KEY);
      if (prefixLengthString == null) {
        message += PREFIX_LENGTH_KEY + " not specified.";
        throw new IllegalArgumentException(message);
      }
      int prefixLength;
      try {
        prefixLength = Integer.parseInt(prefixLengthString);
        if (prefixLength <= 0 || prefixLength > HConstants.MAX_ROW_LENGTH) {
          message +=
            "the value of " + PREFIX_LENGTH_KEY + " must >=0 and < " + HConstants.MAX_ROW_LENGTH;
          throw new IllegalArgumentException(message);
        }
      } catch (NumberFormatException nfe) {
        message = "Number format exception when parsing " + PREFIX_LENGTH_KEY + " for BloomType "
          + bloomFilterType.toString() + ":" + prefixLengthString;
        throw new IllegalArgumentException(message, nfe);
      }
      bloomParam = Bytes.toBytes(prefixLength);
    }
    return bloomParam;
  }
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