Class DescribeLogOffsetsResponse.PartitionOffsets

java.lang.Object
io.confluent.rest.DescribeLogOffsetsResponse.PartitionOffsets
Enclosing class:
DescribeLogOffsetsResponse

public static final class DescribeLogOffsetsResponse.PartitionOffsets extends Object
Offsets for a single partition replica on a single broker.

When this replica is hosted on the broker, error() is null and the eight offset fields are populated, except tierStartOffset() and tierEndOffset(), which are null when tiering is disabled or not yet initialized for the partition.

When the partition is not hosted on this broker (or another non-fatal lookup error occurred), error() is set to a human-readable string and all offset, leader, and epoch fields are null. Null-valued fields are omitted from the JSON serialization to keep the wire form compact.

  • Constructor Details

    • PartitionOffsets

      public PartitionOffsets(String topic, int partition, int brokerId, Boolean leader, Integer leaderEpoch, Long logStartOffset, Long localLogStartOffset, Long logEndOffset, Long highWatermark, Long lastStableOffset, Long recoveryPoint, Long tierStartOffset, Long tierEndOffset, String error)
  • Method Details

    • forHosted

      public static DescribeLogOffsetsResponse.PartitionOffsets forHosted(String topic, int partition, int brokerId, boolean leader, int leaderEpoch, long logStartOffset, long localLogStartOffset, long logEndOffset, long highWatermark, long lastStableOffset, long recoveryPoint, Long tierStartOffset, Long tierEndOffset)
      Build a row for a partition that is hosted on this broker.
    • forError

      public static DescribeLogOffsetsResponse.PartitionOffsets forError(String topic, int partition, int brokerId, String error)
      Build an error row for a partition that is not hosted on this broker.
    • topic

      public String topic()
    • partition

      public int partition()
    • brokerId

      public int brokerId()
    • leader

      public Boolean leader()
    • leaderEpoch

      public Integer leaderEpoch()
    • logStartOffset

      public Long logStartOffset()
    • localLogStartOffset

      public Long localLogStartOffset()
    • logEndOffset

      public Long logEndOffset()
    • highWatermark

      public Long highWatermark()
    • lastStableOffset

      public Long lastStableOffset()
    • recoveryPoint

      public Long recoveryPoint()
    • tierStartOffset

      public Long tierStartOffset()
    • tierEndOffset

      public Long tierEndOffset()
    • error

      public String error()
    • toString

      public String toString()
      Overrides:
      toString in class Object