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 and Description |
|---|
SegmentIdWithShardSpec(String dataSource,
org.joda.time.Interval interval,
String version,
ShardSpec shardSpec) |
| Modifier and Type | Method and Description |
|---|---|
SegmentId |
asSegmentId() |
int |
compareTo(SegmentIdWithShardSpec o) |
boolean |
equals(Object o) |
static SegmentIdWithShardSpec |
fromDataSegment(DataSegment segment) |
String |
getDataSource() |
org.joda.time.Interval |
getInterval() |
ShardSpec |
getShardSpec() |
String |
getVersion() |
int |
hashCode() |
String |
toString() |
public SegmentId asSegmentId()
public String getDataSource()
public org.joda.time.Interval getInterval()
public String getVersion()
public ShardSpec getShardSpec()
public int compareTo(SegmentIdWithShardSpec o)
compareTo in interface Comparable<SegmentIdWithShardSpec>public static SegmentIdWithShardSpec fromDataSegment(DataSegment segment)
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.