private static void writeTableMetrics(Map<String, TableMetric> tableMetrics, DataOutputSerializer out)
            throws IOException {
        final int size = tableMetrics.size();
        out.writeInt(size);
        for (Map.Entry<String, TableMetric> entry : tableMetrics.entrySet()) {
            out.writeUTF(entry.getKey());
            out.writeLong(entry.getValue().getNumRecordsIn());
            out.writeLong(entry.getValue().getNumBytesIn());
        }
    }
A serializer for the {@link SourceSplitBase}.
Copy from com.ververica:flink-cdc-base:2.3.0.
inlong-sort/sort-flink/cdc-base/src/main/java/org/apache/inlong/sort/cdc/base/source/meta/split/SourceSplitSerializer.java