@Override
    public void serialize(ExtendedCell kv) throws IOException {
      dos.writeInt(PrivateCellUtil.estimatedSerializedSizeOf(kv) - Bytes.SIZEOF_INT);
      kv.write(dos, true);
      dos.writeLong(kv.getSequenceId());
    }
Similar to CellSerialization, but includes the sequenceId from an ExtendedCell. This is necessary
so that CellSortReducer can sort by sequenceId, if applicable. Note that these two serializations
are not compatible -- data serialized by CellSerialization cannot be deserialized with
ExtendedCellSerialization and vice versa. This is ok for {@link HFileOutputFormat2} because the
serialization is not actually used for the actual written HFiles, just intermediate data (between
mapper and reducer of a single job).
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/ExtendedCellSerialization.java