Class FireHydrant


  • public class FireHydrant
    extends Object
    • Constructor Detail

      • FireHydrant

        public FireHydrant​(org.apache.druid.segment.incremental.IncrementalIndex index,
                           int count,
                           org.apache.druid.timeline.SegmentId segmentId)
      • FireHydrant

        public FireHydrant​(org.apache.druid.segment.Segment adapter,
                           int count)
    • Method Detail

      • getIndex

        public org.apache.druid.segment.incremental.IncrementalIndex getIndex()
      • getSegmentId

        public org.apache.druid.timeline.SegmentId getSegmentId()
      • getSegmentNumDimensionColumns

        public int getSegmentNumDimensionColumns()
      • getSegmentNumMetricColumns

        public int getSegmentNumMetricColumns()
      • getSegmentDataInterval

        public org.joda.time.Interval getSegmentDataInterval()
      • getCount

        public int getCount()
      • hasSwapped

        public boolean hasSwapped()
      • swapSegment

        public void swapSegment​(@Nullable
                                org.apache.druid.segment.Segment newSegment)
      • getIncrementedSegment

        public org.apache.druid.segment.ReferenceCountingSegment getIncrementedSegment()
      • getAndIncrementSegment

        public org.apache.druid.java.util.common.Pair<org.apache.druid.segment.ReferenceCountingSegment,​Closeable> getAndIncrementSegment()
      • getSegmentForQuery

        public Optional<org.apache.druid.java.util.common.Pair<org.apache.druid.segment.SegmentReference,​Closeable>> getSegmentForQuery​(Function<org.apache.druid.segment.SegmentReference,​org.apache.druid.segment.SegmentReference> segmentMapFn)
        This method is like a combined form of getIncrementedSegment() and getAndIncrementSegment() that deals in SegmentReference instead of directly with ReferenceCountingSegment in order to acquire reference count for both hydrant's segment and any tracked joinables taking part in the query.
      • getHydrantSegment

        public org.apache.druid.segment.ReferenceCountingSegment getHydrantSegment()