Class SegmentDescriptor


  • public class SegmentDescriptor
    extends Object
    The difference between this class and SegmentId is that this class is a "light" version of SegmentId, that only contains the interval, version, and partition number. It's used where the data source, another essential part of SegmentId is determined by the context (e. g. in org.apache.druid.client.CachingClusteredClient, where SegmentDescriptor is used when Brokers tell data servers which segments to include for a particular query) and where having lean JSON representations is important, because it's actively transferred between Druid nodes. It's also for this reason that the JSON field names of SegmentDescriptor are abbreviated.
    • Constructor Detail

      • SegmentDescriptor

        public SegmentDescriptor​(org.joda.time.Interval interval,
                                 String version,
                                 int partitionNumber)
    • Method Detail

      • getInterval

        public org.joda.time.Interval getInterval()
      • getVersion

        public String getVersion()
      • getPartitionNumber

        public int getPartitionNumber()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object