Class InternalTopicManager


  • public class InternalTopicManager
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      InternalTopicManager​(org.apache.kafka.clients.admin.AdminClient adminClient, StreamsConfig streamsConfig)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Map<java.lang.String,​java.lang.Integer> getNumPartitions​(java.util.Set<java.lang.String> topics)
      Try to get the number of partitions for the given topics; return the number of partitions for topics that already exists.
      void makeReady​(java.util.Map<java.lang.String,​InternalTopicConfig> topics)
      Prepares a set of given internal topics.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InternalTopicManager

        public InternalTopicManager​(org.apache.kafka.clients.admin.AdminClient adminClient,
                                    StreamsConfig streamsConfig)
    • Method Detail

      • makeReady

        public void makeReady​(java.util.Map<java.lang.String,​InternalTopicConfig> topics)
        Prepares a set of given internal topics. If a topic does not exist creates a new topic. If a topic with the correct number of partitions exists ignores it. If a topic exists already but has different number of partitions we fail and throw exception requesting user to reset the app before restarting again.
      • getNumPartitions

        protected java.util.Map<java.lang.String,​java.lang.Integer> getNumPartitions​(java.util.Set<java.lang.String> topics)
        Try to get the number of partitions for the given topics; return the number of partitions for topics that already exists. Topics that were not able to get its description will simply not be returned