Package org.apache.druid.timeline
Interface Overshadowable<T extends Overshadowable<T>>
-
- All Known Implementing Classes:
DataSegment
,ReferenceCountingSegment
public interface Overshadowable<T extends Overshadowable<T>>
Interface to represent a class which can have overshadow relation between its instances. InVersionedIntervalTimeline
, Overshadowable is used to represent eachDataSegment
which has the same major version in the same time chunk. An Overshadowable overshadows another if its root partition range contains that of another and has a higher minorVersion. For more details, check https://github.com/apache/druid/issues/7491.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
containsRootPartition(T other)
short
getAtomicUpdateGroupSize()
Return the size of atomicUpdateGroup.int
getEndRootPartitionId()
See doc ofgetStartRootPartitionId()
.short
getMinorVersion()
int
getStartRootPartitionId()
All overshadowables have root partition range.String
getVersion()
default boolean
hasData()
default boolean
overshadows(T other)
Returns true if this overshadowable overshadows the other.
-
-
-
Method Detail
-
overshadows
default boolean overshadows(T other)
Returns true if this overshadowable overshadows the other.
-
containsRootPartition
default boolean containsRootPartition(T other)
-
getStartRootPartitionId
int getStartRootPartitionId()
All overshadowables have root partition range. First-generation overshadowables have (partitionId, partitionId + 1) as their root partition range. Non-first-generation overshadowables are the overshadowables that overwrite first or non-first generation overshadowables, and they have the merged root partition range of all overwritten first-generation overshadowables. Note that first-generation overshadowables can be overwritten by a single non-first-generation overshadowable if they have consecutive partitionId. Non-first-generation overshadowables can be overwritten by another if their root partition ranges are consecutive.
-
getEndRootPartitionId
int getEndRootPartitionId()
See doc ofgetStartRootPartitionId()
.
-
getVersion
String getVersion()
-
getMinorVersion
short getMinorVersion()
-
getAtomicUpdateGroupSize
short getAtomicUpdateGroupSize()
Return the size of atomicUpdateGroup. An atomicUpdateGroup is a set of segments which should be updated all together atomically inVersionedIntervalTimeline
.
-
hasData
default boolean hasData()
-
-