@Override
  public long heapSize() {
    long heapsize = MUTATION_OVERHEAD;
    // Adding row
    heapsize += ClassSize.align(ClassSize.ARRAY + this.row.length);

    // Adding map overhead
    heapsize += ClassSize.align(getFamilyCellMap().size() * ClassSize.MAP_ENTRY);
    for (Map.Entry<byte[], List<Cell>> entry : getFamilyCellMap().entrySet()) {
      // Adding key overhead
      heapsize += ClassSize.align(ClassSize.ARRAY + entry.getKey().length);

      // This part is kinds tricky since the JVM can reuse references if you
      // store the same value, but have a good match with SizeOf at the moment
      // Adding value overhead
      heapsize += ClassSize.align(ClassSize.ARRAYLIST);
      int size = entry.getValue().size();
      heapsize += ClassSize.align(ClassSize.ARRAY + size * ClassSize.REFERENCE);

      for (Cell cell : entry.getValue()) {
        heapsize += cell.heapSize();
      }
    }
    heapsize += getAttributeSize();
    heapsize += extraHeapSize();
    return ClassSize.align(heapsize);
  }
Returns Calculate what Mutation adds to class heap size.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java