Package org.apache.druid.timeline
Class SegmentStatusInCluster
- java.lang.Object
-
- org.apache.druid.timeline.SegmentStatusInCluster
-
- All Implemented Interfaces:
Comparable<SegmentStatusInCluster>
public class SegmentStatusInCluster extends Object implements Comparable<SegmentStatusInCluster>
This class represents the current state of a segment in the cluster and encapsulates the following:- the
DataSegmentobject - overshadowed status of the segment
- replication factor of the segment
- number of rows in the segment
- if the segment is realtime
Objects of this class are used to sync the state of segments from the Coordinator to different services, typically the Broker. ThecompareTo(org.apache.druid.timeline.SegmentStatusInCluster)method considers only theSegmentId.
-
-
Constructor Summary
Constructors Constructor Description SegmentStatusInCluster(boolean overshadowed, Integer replicationFactor, Long numRows, boolean realtime)SegmentStatusInCluster(DataSegment dataSegment, boolean overshadowed, Integer replicationFactor, Long numRows, boolean realtime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(SegmentStatusInCluster o)booleanequals(Object o)DataSegmentgetDataSegment()LonggetNumRows()IntegergetReplicationFactor()inthashCode()booleanisOvershadowed()booleanisRealtime()StringtoString()
-
-
-
Constructor Detail
-
SegmentStatusInCluster
public SegmentStatusInCluster(boolean overshadowed, @Nullable Integer replicationFactor, @Nullable Long numRows, boolean realtime)
-
SegmentStatusInCluster
public SegmentStatusInCluster(DataSegment dataSegment, boolean overshadowed, Integer replicationFactor, Long numRows, boolean realtime)
-
-
Method Detail
-
isOvershadowed
public boolean isOvershadowed()
-
getDataSegment
public DataSegment getDataSegment()
-
isRealtime
public boolean isRealtime()
-
compareTo
public int compareTo(SegmentStatusInCluster o)
- Specified by:
compareToin interfaceComparable<SegmentStatusInCluster>
-
-