public void consumeCell(Cell cell) {
    int cellSize = cell.getSerializedSize();

    rowBytes += cellSize;
    rowCells++;

    boolean tooLarge = false;
    if (cellSize > maxCacheSize) {
      cellsLargerThanMaxCacheSizeCount++;
      tooLarge = true;
    }
    if (cellSize > blockSize) {
      cellsLargerThanOneBlockCount++;
      tooLarge = true;
    }

    if (tooLarge && LOG.isDebugEnabled()) {
      LOG.debug("CellTooLarge: size={}, blockSize={}, maxCacheSize={}, table={}, cell={}", cellSize,
        blockSize, maxCacheSize, table, CellUtil.toString(cell, false));
    }

    if (cellSize > largestCellNumBytes) {
      largestCellRef = cell;
      largestCellNumBytes = cellSize;
    }
    valueSizeBuckets.add(cell.getValueLength());

    totalCellsCount++;
    if (CellUtil.isDelete(cell)) {
      totalDeletesCount++;
    }
    totalBytesCount += cellSize;
  }
Holder for accumulating row statistics in {@link RowStatisticsCompactionObserver} Creates various
cell, row, and total stats.
hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/RowStatisticsImpl.java