Package org.apache.druid.segment
Class IndexMergerV9
java.lang.Object
org.apache.druid.segment.IndexMergerV9
- All Implemented Interfaces:
IndexMerger
-
Field Summary
Fields inherited from interface org.apache.druid.segment.IndexMerger
INVALID_ROW, SERIALIZER_UTILS, UNLIMITED_MAX_COLUMNS_TO_MERGE -
Constructor Summary
ConstructorsConstructorDescriptionIndexMergerV9(com.fasterxml.jackson.databind.ObjectMapper mapper, IndexIO indexIO, SegmentWriteOutMediumFactory defaultSegmentWriteOutMediumFactory) This constructor is used only for Hadoop ingestion and Tranquility as they do not support storing empty columns yet.IndexMergerV9(com.fasterxml.jackson.databind.ObjectMapper mapper, IndexIO indexIO, SegmentWriteOutMediumFactory defaultSegmentWriteOutMediumFactory, boolean storeEmptyColumns) -
Method Summary
Modifier and TypeMethodDescriptionmerge(List<IndexableAdapter> indexes, boolean rollup, AggregatorFactory[] metricAggs, File outDir, DimensionsSpec dimensionsSpec, IndexSpec indexSpec, int maxColumnsToMerge) The indexes here must have the sameMetadata, otherwise an error would be thrown.mergeQueryableIndex(List<QueryableIndex> indexes, boolean rollup, AggregatorFactory[] metricAggs, DimensionsSpec dimensionsSpec, File outDir, IndexSpec indexSpec, IndexSpec indexSpecForIntermediatePersists, ProgressIndicator progress, SegmentWriteOutMediumFactory segmentWriteOutMediumFactory, int maxColumnsToMerge) Merge a collection ofQueryableIndex.persist(IncrementalIndex index, org.joda.time.Interval dataInterval, File outDir, IndexSpec indexSpec, ProgressIndicator progress, SegmentWriteOutMediumFactory segmentWriteOutMediumFactory) Persist an IncrementalIndex to disk in such a way that it can be loaded back up as aQueryableIndex.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.segment.IndexMerger
mergeQueryableIndex, persist, persist
-
Constructor Details
-
IndexMergerV9
public IndexMergerV9(com.fasterxml.jackson.databind.ObjectMapper mapper, IndexIO indexIO, SegmentWriteOutMediumFactory defaultSegmentWriteOutMediumFactory, boolean storeEmptyColumns) -
IndexMergerV9
@Inject public IndexMergerV9(com.fasterxml.jackson.databind.ObjectMapper mapper, IndexIO indexIO, SegmentWriteOutMediumFactory defaultSegmentWriteOutMediumFactory) This constructor is used only for Hadoop ingestion and Tranquility as they do not support storing empty columns yet. SeeHadoopDruidIndexerConfigandPlumberSchoolfor hadoop ingestion and Tranquility, respectively.
-
-
Method Details
-
persist
public File persist(IncrementalIndex index, org.joda.time.Interval dataInterval, File outDir, IndexSpec indexSpec, ProgressIndicator progress, @Nullable SegmentWriteOutMediumFactory segmentWriteOutMediumFactory) throws IOException Description copied from interface:IndexMergerPersist an IncrementalIndex to disk in such a way that it can be loaded back up as aQueryableIndex. This is *not* thread-safe and havoc will ensue if this is called and writes are still occurring on the IncrementalIndex object.- Specified by:
persistin interfaceIndexMerger- Parameters:
index- the IncrementalIndex to persistdataInterval- the Interval that the data represents. Typically, this is the same as the interval from the correspondingSegmentId.outDir- the directory to persist the data toindexSpec- storage and compression optionsprogress- an object that will receive progress updatessegmentWriteOutMediumFactory- controls allocation of temporary data structures- Returns:
- the index output directory
- Throws:
IOException- if an IO error occurs persisting the index
-
mergeQueryableIndex
public File 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 Description copied from interface:IndexMergerMerge a collection ofQueryableIndex.- Specified by:
mergeQueryableIndexin interfaceIndexMerger- Throws:
IOException
-
merge
public File merge(List<IndexableAdapter> indexes, boolean rollup, AggregatorFactory[] metricAggs, File outDir, DimensionsSpec dimensionsSpec, IndexSpec indexSpec, int maxColumnsToMerge) throws IOException The indexes here must have the sameMetadata, otherwise an error would be thrown.- Specified by:
mergein interfaceIndexMerger- Throws:
IOException
-