Class SegmentMetadata

java.lang.Object
org.apache.cassandra.index.sai.disk.v1.segment.SegmentMetadata

public class SegmentMetadata extends Object
Multiple SegmentMetadata are stored in IndexComponent.META file, each corresponds to an on-disk index segment.
  • Field Details

    • rowIdOffset

      public final long rowIdOffset
      Used to retrieve sstableRowId which equals to offset plus segmentRowId.
    • minSSTableRowId

      public final long minSSTableRowId
      Min and max sstable rowId in current segment.

      For index generated by compaction, minSSTableRowId is the same as segmentRowIdOffset. But for flush, segmentRowIdOffset is taken from previous segment's maxSSTableRowId.

    • maxSSTableRowId

      public final long maxSSTableRowId
    • numRows

      public final long numRows
      number of indexed rows (aka. a pair of term and segmentRowId) in the current segment
    • minKey

      public final PrimaryKey minKey
      Ordered by their token position in current segment
    • maxKey

      public final PrimaryKey maxKey
    • minTerm

      public final ByteBuffer minTerm
      Minimum and maximum indexed column value ordered by its AbstractType.
    • maxTerm

      public final ByteBuffer maxTerm
    • componentMetadatas

      public final SegmentMetadata.ComponentMetadataMap componentMetadatas
      Root, offset, length for each index structure in the segment.

      Note: postings block offsets are stored in terms dictionary, no need to worry about its root.

  • Constructor Details

  • Method Details