Interface TaskTopicPartition


public interface TaskTopicPartition
This is a simple container class used during the assignment process to distinguish TopicPartitions type. Since the assignment logic can depend on the type of topic we're looking at, and the rack information of the partition, this container class should have everything necessary to make informed task assignment decisions.
  • Method Details

    • topicPartition

      TopicPartition topicPartition()
      Returns:
      the TopicPartition for this task.
    • isSource

      boolean isSource()
      Returns:
      whether the underlying topic is a source topic or not. Source changelog topics are both source topics and changelog topics.
    • isChangelog

      boolean isChangelog()
      Returns:
      whether the underlying topic is a changelog topic or not. Source changelog topics are both source topics and changelog topics.
    • rackIds

      Optional<Set<String>> rackIds()
      Returns:
      the broker rack ids on which this topic partition resides. If no information could be found, this will return an empty optional value.