private static Map<String, TopicDescription> topicDescriptions(Collection<String> topicsToVerify,
                                                                   Admin adminClient,
                                                                   int retryCount, long retryBackoffMs)
            throws ExecutionException, InterruptedException {
        UnknownTopicOrPartitionException lastException = null;
        for (int i = 0; i < retryCount; i++) {
            try {
                DescribeTopicsResult topicsResult = adminClient.describeTopics(
                        topicsToVerify, new DescribeTopicsOptions().timeoutMs(ADMIN_REQUEST_TIMEOUT));
                return topicsResult.allTopicNames().get();
            } catch (ExecutionException exception) {
                if (exception.getCause() instanceof UnknownTopicOrPartitionException) {
                    lastException = (UnknownTopicOrPartitionException) exception.getCause();
                    Thread.sleep(retryBackoffMs);
                } else {
                    throw exception;
                }
            }
        }
        throw lastException;
    }
Verifies that topics in 'topicsToVerify' list have the same number of partitions as
described in 'topicsInfo'
@param log                The logger to use
@param adminClient        AdminClient
@param topicsToVerify     List of topics to verify
@param topicsInfo         Map of topic name to topic description, which includes topics in
                          'topicsToVerify' list.
@param retryCount         The number of times to retry the fetching of the topics
@param retryBackoffMs     The amount of time, in milliseconds, to wait in between retries
@throws UnknownTopicOrPartitionException If at least one topic contained in 'topicsInfo'
does not exist after retrying.
@throws RuntimeException  If one or more topics have different number of partitions than
described in 'topicsInfo'
trogdor/src/main/java/org/apache/kafka/trogdor/common/WorkerUtils.java