Interface TaskMetadata


public interface TaskMetadata
Metadata of a task.
  • Method Summary

    Modifier and Type
    Method
    Description
    Map<org.apache.kafka.common.TopicPartition,Long>
    Offsets of the source topic partitions committed so far by the task.
    Map<org.apache.kafka.common.TopicPartition,Long>
    End offsets of the source topic partitions of the task.
    boolean
    Compares the specified object with this TaskMetadata.
    int
    Returns the hash code value for this TaskMetadata.
    Task ID of the task.
    Time task idling started.
    Set<org.apache.kafka.common.TopicPartition>
    Source topic partitions of the task.
  • Method Details

    • taskId

      TaskId taskId()
      Task ID of the task.
      Returns:
      task ID consisting of subtopology and partition ID
    • topicPartitions

      Set<org.apache.kafka.common.TopicPartition> topicPartitions()
      Source topic partitions of the task.
      Returns:
      source topic partitions
    • committedOffsets

      Map<org.apache.kafka.common.TopicPartition,Long> committedOffsets()
      Offsets of the source topic partitions committed so far by the task.
      Returns:
      map from source topic partitions to committed offsets
    • endOffsets

      Map<org.apache.kafka.common.TopicPartition,Long> endOffsets()
      End offsets of the source topic partitions of the task.
      Returns:
      map source topic partition to end offsets
    • timeCurrentIdlingStarted

      Optional<Long> timeCurrentIdlingStarted()
      Time task idling started. If the task is not currently idling it will return empty.
      Returns:
      time when task idling started, empty Optional if the task is currently not idling
    • equals

      boolean equals(Object o)
      Compares the specified object with this TaskMetadata. Returns true if and only if the specified object is also a TaskMetadata and both taskId() and topicPartitions() are equal.
      Overrides:
      equals in class Object
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • hashCode

      int hashCode()
      Returns the hash code value for this TaskMetadata. The hash code of a list is defined to be the result of the following calculation:
       
       Objects.hash(taskId(), topicPartitions());
       
       
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object.