Package org.apache.druid.timeline
Interface Overshadowable<T extends Overshadowable<T>>
- All Known Implementing Classes:
DataSegment
public interface Overshadowable<T extends Overshadowable<T>>
Interface to represent a class which can have overshadow relation between its instances.
In
VersionedIntervalTimeline, Overshadowable is used to represent each DataSegment
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
Modifier and TypeMethodDescriptiondefault booleancontainsRootPartition(T other) shortReturn the size of atomicUpdateGroup.intSee doc ofgetStartRootPartitionId().shortintAll overshadowables have root partition range.default booleanhasData()default booleanovershadows(T other) Returns true if this overshadowable overshadows the other.
-
Method Details
-
overshadows
Returns true if this overshadowable overshadows the other. -
containsRootPartition
-
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()
-