private void maybeEnsureValid(final Record record, final boolean checkCrcs) {
        if (checkCrcs) {
            try {
                record.ensureValid();
            } catch (CorruptRecordException e) {
                throw new CorruptRecordException("Record for partition " + partition.topicPartition()
                        + " at offset " + record.offset() + " is invalid, cause: " + e.getMessage());
            }
        }
    }
Parse the record entry, deserializing the key / value fields if necessary
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareCompletedFetch.java