Class OnheapIncrementalIndex
- java.lang.Object
-
- org.apache.druid.segment.incremental.IncrementalIndex
-
- org.apache.druid.segment.incremental.OnheapIncrementalIndex
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<Row>,Expr.InputBindingInspector,ColumnInspector
public class OnheapIncrementalIndex extends IncrementalIndex
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOnheapIncrementalIndex.Builderstatic classOnheapIncrementalIndex.Spec-
Nested classes/interfaces inherited from class org.apache.druid.segment.incremental.IncrementalIndex
IncrementalIndex.DimensionDesc, IncrementalIndex.FactsHolder, IncrementalIndex.InputRowHolder, IncrementalIndex.MetricDesc
-
-
Field Summary
Fields Modifier and Type Field Description protected longmaxBytesInMemoryprotected intmaxRowCount-
Fields inherited from class org.apache.druid.segment.incremental.IncrementalIndex
preserveExistingMetrics
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.druid.segment.incremental.IncrementalIndex.AddToFactsResultaddToFacts(IncrementalIndexRow key, IncrementalIndex.InputRowHolder inputRowHolder, boolean skipMaxRowsInMemoryCheck)booleancanAppendRow()voidclose()Clear out maps to allow GC NOTE: This is NOT thread-safe with add...protected Aggregator[]concurrentGet(int offset)protected voidconcurrentSet(int offset, Aggregator[] value)protected Aggregator[]getAggsForRow(int rowOffset)IncrementalIndex.FactsHoldergetFacts()intgetLastRowIndex()protected doublegetMetricDoubleValue(int rowOffset, int aggOffset)floatgetMetricFloatValue(int rowOffset, int aggOffset)longgetMetricLongValue(int rowOffset, int aggOffset)ObjectgetMetricObjectValue(int rowOffset, int aggOffset)StringgetOutOfRowsReason()protected voidinitAggs(AggregatorFactory[] metrics, IncrementalIndex.InputRowHolder inputRowHolder)booleanisNull(int rowOffset, int aggOffset)Iterable<Row>iterableWithPostAggregations(List<PostAggregator> postAggs, boolean descending)-
Methods inherited from class org.apache.druid.segment.incremental.IncrementalIndex
add, add, dimsComparator, formatRow, getBytesInMemory, getColumnCapabilities, getColumnFormat, getColumnFormats, getColumnNames, getCombinedParseException, getDimension, getDimensionIndex, getDimensionNames, getDimensionOrder, getDimensions, getDimensionsSpec, getInterval, getMaxIngestedEventTime, getMaxTime, getMetadata, getMetricAggs, getMetricNames, getMinTime, isEmpty, isRollup, iterator, loadDimensionIterable, makeColumnSelectorFactory, makeColumnSelectorFactory, makeDefaultCapabilitiesFromValueType, makeMetricColumnValueSelector, size
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.segment.ColumnInspector
getType
-
Methods inherited from interface org.apache.druid.math.expr.Expr.InputBindingInspector
areNumeric, areNumeric, areSameTypes, areSameTypes, areScalar, areScalar, canVectorize, canVectorize
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getFacts
public IncrementalIndex.FactsHolder getFacts()
- Specified by:
getFactsin classIncrementalIndex
-
initAggs
protected void initAggs(AggregatorFactory[] metrics, IncrementalIndex.InputRowHolder inputRowHolder)
- Specified by:
initAggsin classIncrementalIndex
-
addToFacts
protected org.apache.druid.segment.incremental.IncrementalIndex.AddToFactsResult addToFacts(IncrementalIndexRow key, IncrementalIndex.InputRowHolder inputRowHolder, boolean skipMaxRowsInMemoryCheck) throws IndexSizeExceededException
- Specified by:
addToFactsin classIncrementalIndex- Throws:
IndexSizeExceededException
-
getLastRowIndex
public int getLastRowIndex()
- Specified by:
getLastRowIndexin classIncrementalIndex
-
concurrentGet
protected Aggregator[] concurrentGet(int offset)
-
concurrentSet
protected void concurrentSet(int offset, Aggregator[] value)
-
canAppendRow
public boolean canAppendRow()
- Specified by:
canAppendRowin classIncrementalIndex
-
getOutOfRowsReason
public String getOutOfRowsReason()
- Specified by:
getOutOfRowsReasonin classIncrementalIndex
-
getAggsForRow
protected Aggregator[] getAggsForRow(int rowOffset)
-
getMetricFloatValue
public float getMetricFloatValue(int rowOffset, int aggOffset)- Specified by:
getMetricFloatValuein classIncrementalIndex
-
getMetricLongValue
public long getMetricLongValue(int rowOffset, int aggOffset)- Specified by:
getMetricLongValuein classIncrementalIndex
-
getMetricObjectValue
public Object getMetricObjectValue(int rowOffset, int aggOffset)
- Specified by:
getMetricObjectValuein classIncrementalIndex
-
getMetricDoubleValue
protected double getMetricDoubleValue(int rowOffset, int aggOffset)- Specified by:
getMetricDoubleValuein classIncrementalIndex
-
isNull
public boolean isNull(int rowOffset, int aggOffset)- Specified by:
isNullin classIncrementalIndex
-
iterableWithPostAggregations
public Iterable<Row> iterableWithPostAggregations(@Nullable List<PostAggregator> postAggs, boolean descending)
- Specified by:
iterableWithPostAggregationsin classIncrementalIndex
-
close
public void close()
Clear out maps to allow GC NOTE: This is NOT thread-safe with add... so make sure all the adding is DONE before closing- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classIncrementalIndex
-
-