Class SegmentSchemaMapping

java.lang.Object
org.apache.druid.segment.SegmentSchemaMapping

public class SegmentSchemaMapping extends Object
Compact representation of segment schema for multiple segments. Note, that this is a mutable class.
  • Constructor Details

    • SegmentSchemaMapping

      public SegmentSchemaMapping(Map<String,SegmentMetadata> segmentIdToMetadataMap, Map<String,SchemaPayload> schemaFingerprintToPayloadMap, int schemaVersion)
    • SegmentSchemaMapping

      public SegmentSchemaMapping(int schemaVersion)
  • Method Details

    • getSegmentIdToMetadataMap

      public Map<String,SegmentMetadata> getSegmentIdToMetadataMap()
    • getSchemaFingerprintToPayloadMap

      public Map<String,SchemaPayload> getSchemaFingerprintToPayloadMap()
    • getSchemaVersion

      public int getSchemaVersion()
    • isNonEmpty

      public boolean isNonEmpty()
    • addSchema

      public void addSchema(SegmentId segmentId, SchemaPayloadPlus schemaPayloadPlus, String fingerprint)
      Add schema information for the segment.
    • merge

      public void merge(SegmentSchemaMapping other)
      Merge with another instance.
    • getSchemaCount

      public int getSchemaCount()
    • 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