public interface IndexMerger
| Modifier and Type | Field and Description |
|---|---|
static int |
INVALID_ROW |
static Logger |
log |
static SerializerUtils |
SERIALIZER_UTILS |
static int |
UNLIMITED_MAX_COLUMNS_TO_MERGE |
static final Logger log
static final SerializerUtils SERIALIZER_UTILS
static final int INVALID_ROW
static final int UNLIMITED_MAX_COLUMNS_TO_MERGE
static List<String> getMergedDimensionsFromQueryableIndexes(List<QueryableIndex> indexes, @Nullable DimensionsSpec dimensionsSpec)
static List<IndexableAdapter> toIndexableAdapters(List<QueryableIndex> indexes)
static List<String> getMergedDimensions(List<IndexableAdapter> indexes, @Nullable DimensionsSpec dimensionsSpec)
@Nullable static List<String> getLongestSharedDimOrder(List<IndexableAdapter> indexes, @Nullable DimensionsSpec dimensionsSpec)
static boolean isDimensionOrderingValid(List<IndexableAdapter> indexes, Iterable<String> orderingCandidate)
static List<String> getLexicographicMergedDimensions(List<IndexableAdapter> indexes)
static <T extends Comparable<? super T>> ArrayList<T> mergeIndexed(List<Iterable<T>> indexedLists)
default File persist(IncrementalIndex index, File outDir, IndexSpec indexSpec, @Nullable SegmentWriteOutMediumFactory segmentWriteOutMediumFactory) throws IOException
persist(IncrementalIndex, Interval, File, IndexSpec, ProgressIndicator, SegmentWriteOutMediumFactory)
without a progress indicator and with interval set to IncrementalIndex.getInterval().IOExceptiondefault File persist(IncrementalIndex index, org.joda.time.Interval dataInterval, File outDir, IndexSpec indexSpec, @Nullable SegmentWriteOutMediumFactory segmentWriteOutMediumFactory) throws IOException
persist(IncrementalIndex, Interval, File, IndexSpec, ProgressIndicator, SegmentWriteOutMediumFactory)
without a progress indicator.IOExceptionFile persist(IncrementalIndex index, org.joda.time.Interval dataInterval, File outDir, IndexSpec indexSpec, ProgressIndicator progress, @Nullable SegmentWriteOutMediumFactory segmentWriteOutMediumFactory) throws IOException
QueryableIndex.
This is *not* thread-safe and havoc will ensue if this is called and writes are still occurring on the
IncrementalIndex object.index - the IncrementalIndex to persistdataInterval - the Interval that the data represents. Typically, this is the same as the
interval from the corresponding SegmentId.outDir - the directory to persist the data toindexSpec - storage and compression optionsprogress - an object that will receive progress updatessegmentWriteOutMediumFactory - controls allocation of temporary data structuresIOException - if an IO error occurs persisting the indexdefault File mergeQueryableIndex(List<QueryableIndex> indexes, boolean rollup, AggregatorFactory[] metricAggs, File outDir, IndexSpec indexSpec, @Nullable SegmentWriteOutMediumFactory segmentWriteOutMediumFactory, int maxColumnsToMerge) throws IOException
QueryableIndex.
Only used as a convenience method in tests. In production code, use the full version
mergeQueryableIndex(List, boolean, AggregatorFactory[], DimensionsSpec, File, IndexSpec, IndexSpec, ProgressIndicator, SegmentWriteOutMediumFactory, int).IOExceptionFile mergeQueryableIndex(List<QueryableIndex> indexes, boolean rollup, AggregatorFactory[] metricAggs, @Nullable DimensionsSpec dimensionsSpec, File outDir, IndexSpec indexSpec, IndexSpec indexSpecForIntermediatePersists, ProgressIndicator progress, @Nullable SegmentWriteOutMediumFactory segmentWriteOutMediumFactory, int maxColumnsToMerge) throws IOException
QueryableIndex.IOExceptionFile merge(List<IndexableAdapter> indexes, boolean rollup, AggregatorFactory[] metricAggs, File outDir, DimensionsSpec dimensionsSpec, IndexSpec indexSpec, int maxColumnsToMerge) throws IOException
QueryableIndex, use
mergeQueryableIndex(List, boolean, AggregatorFactory[], DimensionsSpec, File, IndexSpec, IndexSpec, ProgressIndicator, SegmentWriteOutMediumFactory, int).
To merge multiple IncrementalIndex, call one of the persist(org.apache.druid.segment.incremental.IncrementalIndex, java.io.File, org.apache.druid.segment.IndexSpec, org.apache.druid.segment.writeout.SegmentWriteOutMediumFactory) methods and then merge the resulting
QueryableIndex.IOExceptionstatic TransformableRowIterator toMergedIndexRowIterator(TransformableRowIterator sourceRowIterator, int indexNumber, List<DimensionMergerV9> mergers)
DimensionMerger.convertSortedSegmentRowValuesToMergedRowValues(int, ColumnValueSelector) to
all dimension column selectors of the given sourceRowIterator, using the given index number.static TransformableRowIterator makeRowIteratorWithConvertedDimensionColumns(TransformableRowIterator sourceRowIterator, ColumnValueSelector[] convertedDimensionSelectors, ColumnValueSelector[] convertedMarkedDimensionSelectors)
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.