Class FireHydrant
- java.lang.Object
-
- org.apache.druid.segment.realtime.FireHydrant
-
public class FireHydrant extends Object
-
-
Constructor Summary
Constructors Constructor Description FireHydrant(org.apache.druid.segment.incremental.IncrementalIndex index, int count, org.apache.druid.timeline.SegmentId segmentId)FireHydrant(org.apache.druid.segment.Segment adapter, int count)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.druid.java.util.common.Pair<org.apache.druid.segment.ReferenceCountingSegment,Closeable>getAndIncrementSegment()intgetCount()org.apache.druid.segment.ReferenceCountingSegmentgetHydrantSegment()org.apache.druid.segment.ReferenceCountingSegmentgetIncrementedSegment()org.apache.druid.segment.incremental.IncrementalIndexgetIndex()org.joda.time.IntervalgetSegmentDataInterval()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 ofgetIncrementedSegment()andgetAndIncrementSegment()that deals inSegmentReferenceinstead of directly withReferenceCountingSegmentin order to acquire reference count for both hydrant's segment and any tracked joinables taking part in the query.org.apache.druid.timeline.SegmentIdgetSegmentId()intgetSegmentNumDimensionColumns()intgetSegmentNumMetricColumns()booleanhasSwapped()voidswapSegment(org.apache.druid.segment.Segment newSegment)StringtoString()
-
-
-
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 ofgetIncrementedSegment()andgetAndIncrementSegment()that deals inSegmentReferenceinstead of directly withReferenceCountingSegmentin 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()
-
-