public static long getBucketCacheSize(final Configuration conf) {
    // Size configured in MBs
    float bucketCacheSize = conf.getFloat(HConstants.BUCKET_CACHE_SIZE_KEY, 0F);
    if (bucketCacheSize < 1) {
      throw new IllegalArgumentException("Bucket Cache should be minimum 1 MB in size."
        + "Configure 'hbase.bucketcache.size' with > 1 value");
    }
    return (long) (bucketCacheSize * 1024 * 1024);
  }
@param conf used to read config for bucket cache size.
@return the number of bytes to use for bucket cache, negative if disabled.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/util/MemorySizeUtil.java