private void checkAllPartitions(final Set<String> allSourceTopics,
                                    final Map<TaskId, Set<TopicPartition>> partitionsForTask,
                                    final Set<TopicPartition> allAssignedPartitions,
                                    final Cluster fullMetadata) {
        for (final String topic : allSourceTopics) {
            final List<PartitionInfo> partitionInfoList = fullMetadata.partitionsForTopic(topic);
            if (partitionInfoList.isEmpty()) {
                log.warn("No partitions found for topic {}", topic);
            } else {
                for (final PartitionInfo partitionInfo : partitionInfoList) {
                    final TopicPartition partition = new TopicPartition(partitionInfo.topic(),
                        partitionInfo.partition());
                    if (!allAssignedPartitions.contains(partition)) {
                        log.warn("Partition {} is not assigned to any tasks: {}"
                                     + " Possible causes of a partition not getting assigned"
                                     + " is that another topic defined in the topology has not been"
                                     + " created when starting your streams application,"
                                     + " resulting in no tasks created for this topology at all.", partition,
                            partitionsForTask);
                    }
                }
            }
        }
    }
Populates the taskForPartition and tasksForTopicGroup maps, and checks that partitions are assigned to exactly
one task.

@param taskForPartition a map from partition to the corresponding task. Populated here.
@param tasksForTopicGroup a map from the topicGroupId to the set of corresponding tasks. Populated here.
@param allSourceTopics a set of all source topics in the topology
@param partitionsForTask a map from task to the set of input partitions
@param fullMetadata the cluster metadata
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsPartitionAssignor.java