void update(long value, boolean collectRanges) {
      histogram.update(value);
      min = Math.min(value, min);
      max = Math.max(value, max);

      if (collectRanges) {
        this.collectRanges = true;
        int result = Arrays.binarySearch(RANGES, value);
        int idx = result >= 0 ? result : Math.abs(result) - 1;
        rangeCounts[idx].increment();
      }
    }
Holds a Histogram and supporting min/max and range buckets for analyzing distribution of key
bytes, value bytes, row bytes, and row columns. Supports adding values, getting the histogram,
and getting counts per range.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java