public Set<TopicPartition> partitions() {
        return Collections.unmodifiableSet(records.keySet());
    }
Get the partitions which have records contained in this record set.
@return the set of partitions with data in this record set (may be empty if no data was returned)
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecords.java