public int currentPartitionEpoch(
        Uuid topicId, int partitionId
    ) {
        Map<Integer, Integer> partitions = currentPartitionEpoch.get(topicId);
        if (partitions == null) {
            return -1;
        } else {
            return partitions.getOrDefault(partitionId, -1);
        }
    }
Returns the current epoch of a partition or -1 if the partition
does not have one.

@param topicId       The topic id.
@param partitionId   The partition id.

@return The epoch or -1.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/ModernGroup.java