protected List<OUT> serialize(RowData in) {
        try {
            return stateEncoder.serialize(in, serializationSchema);
        } catch (Exception e) {
            LOG.error("Error when serializing data: " + in);
            throw new RuntimeException(e);
        }
    }
The stop watch to measure time duration.
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/redis/src/main/java/org/apache/inlong/sort/redis/sink/AbstractRedisSinkFunction.java