void checkTopicQuota(CreateTopicsRequestData request, Map<String, ApiError> topicErrors) {
        int topicCountQuota = configurationControl.topicCountQuota();
        int topicCount = topics.size();
        int topicAdditionCount = request.topics().size();
        if (topicCount + topicAdditionCount > topicCountQuota) {
            for (CreatableTopic topic : request.topics()) {
                topicErrors.put(topic.name(),
                    new ApiError(Errors.THROTTLING_QUOTA_EXCEEDED, "Topic count quota exceeded: current quota is " + topicCountQuota));
            }
        }

        int partitionCountQuota = configurationControl.partitionCountQuota();
        int partitionCount = this.topics.values().stream().mapToInt(info -> info.parts.size()).sum();
        int partitionAdditionCount = request.topics().stream()
            .mapToInt(topic -> topic.numPartitions() == -1 ? defaultNumPartitions : topic.numPartitions())
            .sum();
        if (partitionCount + partitionAdditionCount > partitionCountQuota) {
            for (CreatableTopic topic : request.topics()) {
                topicErrors.put(topic.name(),
                    new ApiError(Errors.THROTTLING_QUOTA_EXCEEDED, "Partition count quota exceeded: current quota is " + partitionCountQuota));
            }
        }
    }
Timer for partition reassignment elect timeout.
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java