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. 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 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.
      • 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 in VersionedIntervalTimeline.
      • hasData

        default boolean hasData()