Class SegmentIdWithShardSpec
- java.lang.Object
-
- org.apache.druid.segment.realtime.appenderator.SegmentIdWithShardSpec
-
- All Implemented Interfaces:
Comparable<SegmentIdWithShardSpec>
public final class SegmentIdWithShardSpec extends Object implements Comparable<SegmentIdWithShardSpec>
SegmentIdwith additionalShardSpecinfo.equals(java.lang.Object)/hashCode()andcompareTo(org.apache.druid.segment.realtime.appenderator.SegmentIdWithShardSpec)don't consider that additinal info. This class is separate fromSegmentIdbecause in a lot of places segment ids are transmitted as "segment id strings" that don't contain enough information to deconstruct theShardSpec. Also, even a single extra field inSegmentIdis important, because it adds to the memory footprint considerably.
-
-
Constructor Summary
Constructors Constructor Description SegmentIdWithShardSpec(String dataSource, org.joda.time.Interval interval, String version, org.apache.druid.timeline.partition.ShardSpec shardSpec)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.druid.timeline.SegmentIdasSegmentId()intcompareTo(SegmentIdWithShardSpec o)booleanequals(Object o)static SegmentIdWithShardSpecfromDataSegment(org.apache.druid.timeline.DataSegment segment)StringgetDataSource()org.joda.time.IntervalgetInterval()org.apache.druid.timeline.partition.ShardSpecgetShardSpec()StringgetVersion()inthashCode()StringtoString()
-
-
-
Method Detail
-
asSegmentId
public org.apache.druid.timeline.SegmentId asSegmentId()
-
getDataSource
public String getDataSource()
-
getInterval
public org.joda.time.Interval getInterval()
-
getVersion
public String getVersion()
-
getShardSpec
public org.apache.druid.timeline.partition.ShardSpec getShardSpec()
-
compareTo
public int compareTo(SegmentIdWithShardSpec o)
- Specified by:
compareToin interfaceComparable<SegmentIdWithShardSpec>
-
fromDataSegment
public static SegmentIdWithShardSpec fromDataSegment(org.apache.druid.timeline.DataSegment segment)
-
-