Class DataSegmentPlus

java.lang.Object
org.apache.druid.server.http.DataSegmentPlus

public class DataSegmentPlus extends Object
Encapsulates a DataSegment and additional metadata about it:
  • used - Boolean flag representing if the segment is used.
  • createdDate - The time when the segment was created.
  • usedStatusLastUpdatedDate - The time when the segments used status was last updated.
  • upgradedFromSegmentId - The segment id to which the same load spec originally belonged. Load specs can be shared as a result of segment version upgrades.

This class closely resembles the row structure of the MetadataStorageTablesConfig.getSegmentsTable().

  • Constructor Details

    • DataSegmentPlus

      public DataSegmentPlus(DataSegment dataSegment, @Nullable org.joda.time.DateTime createdDate, @Nullable org.joda.time.DateTime usedStatusLastUpdatedDate, @Nullable Boolean used, @Nullable String schemaFingerprint, @Nullable Long numRows, @Nullable String upgradedFromSegmentId)
  • Method Details

    • getCreatedDate

      @Nullable public org.joda.time.DateTime getCreatedDate()
    • getUsedStatusLastUpdatedDate

      @Nullable public org.joda.time.DateTime getUsedStatusLastUpdatedDate()
    • getDataSegment

      public DataSegment getDataSegment()
    • getUsed

      @Nullable public Boolean getUsed()
    • getSchemaFingerprint

      @Nullable public String getSchemaFingerprint()
    • getNumRows

      @Nullable public Long getNumRows()
    • getUpgradedFromSegmentId

      @Nullable public String getUpgradedFromSegmentId()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object