public abstract class IncrementalIndex<AggregatorType> extends Object implements Iterable<io.druid.data.input.Row>, Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
IncrementalIndex.DimensionDesc |
static class |
IncrementalIndex.FactsEntry |
static class |
IncrementalIndex.MetricDesc |
static class |
IncrementalIndex.TimeAndDims |
| Constructor and Description |
|---|
IncrementalIndex(IncrementalIndexSchema incrementalIndexSchema,
boolean deserializeComplexMetrics,
boolean reportParseExceptions)
Setting deserializeComplexMetrics to false is necessary for intermediate aggregation such as groupBy that
should not deserialize input columns using ComplexMetricSerde for aggregators that return complex metrics.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic IncrementalIndex(IncrementalIndexSchema incrementalIndexSchema, boolean deserializeComplexMetrics, boolean reportParseExceptions)
incrementalIndexSchema - the schema to use for incremental indexdeserializeComplexMetrics - flag whether or not to call ComplexMetricExtractor.extractValue() on the input
value for aggregators that return metrics other than float.reportParseExceptions - flag whether or not to report ParseExceptions that occur while extracting values
from input rowspublic static ColumnSelectorFactory makeColumnSelectorFactory(AggregatorFactory agg, com.google.common.base.Supplier<io.druid.data.input.InputRow> in, boolean deserializeComplexMetrics, Map<String,ColumnCapabilitiesImpl> columnCapabilities)
public boolean isRollup()
public abstract io.druid.segment.incremental.IncrementalIndex.FactsHolder getFacts()
public abstract boolean canAppendRow()
public abstract String getOutOfRowsReason()
protected abstract AggregatorType[] initAggs(AggregatorFactory[] metrics, com.google.common.base.Supplier<io.druid.data.input.InputRow> rowSupplier, boolean deserializeComplexMetrics)
protected abstract Integer addToFacts(AggregatorFactory[] metrics, boolean deserializeComplexMetrics, boolean reportParseExceptions, io.druid.data.input.InputRow row, AtomicInteger numEntries, IncrementalIndex.TimeAndDims key, ThreadLocal<io.druid.data.input.InputRow> rowContainer, com.google.common.base.Supplier<io.druid.data.input.InputRow> rowSupplier) throws IndexSizeExceededException
IndexSizeExceededExceptionprotected abstract AggregatorType[] getAggsForRow(int rowOffset)
protected abstract Object getAggVal(AggregatorType agg, int rowOffset, int aggPosition)
protected abstract float getMetricFloatValue(int rowOffset,
int aggOffset)
protected abstract long getMetricLongValue(int rowOffset,
int aggOffset)
protected abstract Object getMetricObjectValue(int rowOffset, int aggOffset)
public void close()
close in interface Closeableclose in interface AutoCloseablepublic io.druid.data.input.InputRow formatRow(io.druid.data.input.InputRow row)
public Map<String,IncrementalIndex.DimensionDesc> getDimensionDescs()
public Map<String,ColumnCapabilitiesImpl> getColumnCapabilities()
public int add(io.druid.data.input.InputRow row) throws IndexSizeExceededException
Calls to add() are thread safe.
row - the row of data to addIndexSizeExceededExceptionpublic boolean isEmpty()
public int size()
public AggregatorType[] getAggs()
public AggregatorFactory[] getMetricAggs()
public List<IncrementalIndex.DimensionDesc> getDimensions()
public IncrementalIndex.DimensionDesc getDimension(String dimension)
public org.joda.time.Interval getInterval()
public org.joda.time.DateTime getMinTime()
public org.joda.time.DateTime getMaxTime()
public void loadDimensionIterable(Iterable<String> oldDimensionOrder, Map<String,ColumnCapabilitiesImpl> oldColumnCapabilities)
public List<IncrementalIndex.MetricDesc> getMetrics()
public ColumnCapabilities getCapabilities(String column)
public Metadata getMetadata()
public Map<String,DimensionHandler> getDimensionHandlers()
public Iterator<io.druid.data.input.Row> iterator()
iterator in interface Iterable<io.druid.data.input.Row>public Iterable<io.druid.data.input.Row> iterableWithPostAggregations(List<PostAggregator> postAggs, boolean descending)
public org.joda.time.DateTime getMaxIngestedEventTime()
protected final Comparator<IncrementalIndex.TimeAndDims> dimsComparator()
Copyright © 2011–2016. All rights reserved.