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>
SegmentId with additional ShardSpec info. equals(java.lang.Object)/hashCode() and compareTo(org.apache.druid.segment.realtime.appenderator.SegmentIdWithShardSpec) don't consider that additinal info.
This class is separate from SegmentId because in a lot of places segment ids are transmitted as "segment id
strings" that don't contain enough information to deconstruct the ShardSpec. Also, even a single extra field
in SegmentId is important, because it adds to the memory footprint considerably.-
Constructor Summary
ConstructorsConstructorDescriptionSegmentIdWithShardSpec(String dataSource, org.joda.time.Interval interval, String version, ShardSpec shardSpec) -
Method Summary
Modifier and TypeMethodDescriptionintbooleanstatic SegmentIdWithShardSpecfromDataSegment(DataSegment segment) org.joda.time.IntervalinthashCode()toString()
-
Constructor Details
-
SegmentIdWithShardSpec
-
-
Method Details
-
asSegmentId
-
getDataSource
-
getInterval
public org.joda.time.Interval getInterval() -
getVersion
-
getShardSpec
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<SegmentIdWithShardSpec>
-
toString
-
fromDataSegment
-