Class ReferenceCountedSegmentProvider.LeafReference

java.lang.Object
org.apache.druid.segment.ReferenceCountedSegmentProvider.LeafReference
All Implemented Interfaces:
Closeable, AutoCloseable, Segment
Direct Known Subclasses:
ReferenceCountedSegmentProvider.CloseableWrappedReference, ReferenceCountedSegmentProvider.ReferenceClosingSegment, ReferenceCountedSegmentProvider.UnmanagedReference
Enclosing class:
ReferenceCountedSegmentProvider

public abstract static class ReferenceCountedSegmentProvider.LeafReference extends Object implements Segment
Base type to mark Segment returned by ReferenceCountedObjectProvider<Segment> as 'leaf' segments, to distinguish from other transformations which can be done on top of this segment, such as by SegmentMapFunction
  • Field Details

    • baseSegment

      protected final Segment baseSegment
  • Constructor Details

    • LeafReference

      public LeafReference(Segment baseSegment)
  • Method Details

    • getId

      @Nullable public SegmentId getId()
      Description copied from interface: Segment
      Returns the SegmentId of this segment, if it is backed by a real table, otherwise returns null.
      Specified by:
      getId in interface Segment
    • getDataInterval

      public org.joda.time.Interval getDataInterval()
      Specified by:
      getDataInterval in interface Segment
    • isTombstone

      public boolean isTombstone()
      Specified by:
      isTombstone in interface Segment
    • getDebugString

      public String getDebugString()
      Description copied from interface: Segment
      Developer friendly string suitable to use in internal error messages and provide some additional information about what kind of segment was involved in a problem
      Specified by:
      getDebugString in interface Segment
    • validateOrElseThrow

      public void validateOrElseThrow(PolicyEnforcer policyEnforcer)
      Description copied from interface: Segment
      Validates if the segment complies with the policy restrictions on tables.

      This should be called right before the segment is about to be processed by the query stack, and after ExecutionVertex.createSegmentMapFunction(PolicyEnforcer).

      Specified by:
      validateOrElseThrow in interface Segment