public class IndexMerger extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IndexMerger.AggFactoryStringIndexed |
static class |
IndexMerger.MMappedIndexRowIterable |
static class |
IndexMerger.RowboatMergeFunction |
Modifier and Type | Field and Description |
---|---|
protected static ListIndexed |
EMPTY_STR_DIM_VAL |
protected IndexIO |
indexIO |
protected static int |
INVALID_ROW |
protected com.fasterxml.jackson.databind.ObjectMapper |
mapper |
protected static SerializerUtils |
serializerUtils |
protected static com.google.common.base.Splitter |
SPLITTER |
Constructor and Description |
---|
IndexMerger(com.fasterxml.jackson.databind.ObjectMapper mapper,
IndexIO indexIO) |
Modifier and Type | Method and Description |
---|---|
File |
append(List<IndexableAdapter> indexes,
AggregatorFactory[] aggregators,
File outDir,
IndexSpec indexSpec) |
File |
append(List<IndexableAdapter> indexes,
AggregatorFactory[] aggregators,
File outDir,
IndexSpec indexSpec,
ProgressIndicator progress) |
File |
convert(File inDir,
File outDir,
IndexSpec indexSpec) |
File |
convert(File inDir,
File outDir,
IndexSpec indexSpec,
ProgressIndicator progress) |
void |
createIndexDrdFile(byte versionId,
File inDir,
GenericIndexed<String> availableDimensions,
GenericIndexed<String> availableMetrics,
org.joda.time.Interval dataInterval,
BitmapSerdeFactory bitmapSerdeFactory) |
static List<String> |
getMergedDimensions(List<IndexableAdapter> indexes) |
static boolean |
isNullColumn(Iterable<String> dimValues) |
protected DimensionHandler[] |
makeDimensionHandlers(List<String> mergedDimensions,
List<ColumnCapabilitiesImpl> dimCapabilities) |
protected File |
makeIndexFiles(List<IndexableAdapter> indexes,
AggregatorFactory[] metricAggs,
File outDir,
ProgressIndicator progress,
List<String> mergedDimensions,
List<String> mergedMetrics,
com.google.common.base.Function<ArrayList<Iterable<Rowboat>>,Iterable<Rowboat>> rowMergerFn,
IndexSpec indexSpec) |
protected Iterable<Rowboat> |
makeRowIterable(List<IndexableAdapter> indexes,
List<String> mergedDimensions,
List<String> mergedMetrics,
com.google.common.base.Function<ArrayList<Iterable<Rowboat>>,Iterable<Rowboat>> rowMergerFn,
List<ColumnCapabilitiesImpl> dimCapabilities,
DimensionHandler[] handlers,
List<DimensionMerger> mergers) |
File |
merge(List<IndexableAdapter> indexes,
boolean rollup,
AggregatorFactory[] metricAggs,
File outDir,
IndexSpec indexSpec) |
File |
merge(List<IndexableAdapter> indexes,
boolean rollup,
AggregatorFactory[] metricAggs,
File outDir,
IndexSpec indexSpec,
ProgressIndicator progress) |
static <T extends Comparable> |
mergeIndexed(List<Iterable<T>> indexedLists) |
File |
mergeQueryableIndex(List<QueryableIndex> indexes,
boolean rollup,
AggregatorFactory[] metricAggs,
File outDir,
IndexSpec indexSpec) |
File |
mergeQueryableIndex(List<QueryableIndex> indexes,
boolean rollup,
AggregatorFactory[] metricAggs,
File outDir,
IndexSpec indexSpec,
ProgressIndicator progress) |
File |
persist(IncrementalIndex index,
File outDir,
IndexSpec indexSpec) |
File |
persist(IncrementalIndex index,
org.joda.time.Interval dataInterval,
File outDir,
IndexSpec indexSpec)
This is *not* thread-safe and havok will ensue if this is called and writes are still occurring
on the IncrementalIndex object.
|
File |
persist(IncrementalIndex index,
org.joda.time.Interval dataInterval,
File outDir,
IndexSpec indexSpec,
ProgressIndicator progress) |
protected static final ListIndexed EMPTY_STR_DIM_VAL
protected static final SerializerUtils serializerUtils
protected static final int INVALID_ROW
protected static final com.google.common.base.Splitter SPLITTER
protected final com.fasterxml.jackson.databind.ObjectMapper mapper
protected final IndexIO indexIO
@Inject public IndexMerger(com.fasterxml.jackson.databind.ObjectMapper mapper, IndexIO indexIO)
public File persist(IncrementalIndex index, File outDir, IndexSpec indexSpec) throws IOException
IOException
public File persist(IncrementalIndex index, org.joda.time.Interval dataInterval, File outDir, IndexSpec indexSpec) throws IOException
index
- the IncrementalIndex to persistdataInterval
- the Interval that the data representsoutDir
- the directory to persist the data toIOException
- if an IO error occurs persisting the indexpublic File persist(IncrementalIndex index, org.joda.time.Interval dataInterval, File outDir, IndexSpec indexSpec, ProgressIndicator progress) throws IOException
IOException
public File mergeQueryableIndex(List<QueryableIndex> indexes, boolean rollup, AggregatorFactory[] metricAggs, File outDir, IndexSpec indexSpec) throws IOException
IOException
public File mergeQueryableIndex(List<QueryableIndex> indexes, boolean rollup, AggregatorFactory[] metricAggs, File outDir, IndexSpec indexSpec, ProgressIndicator progress) throws IOException
IOException
public File merge(List<IndexableAdapter> indexes, boolean rollup, AggregatorFactory[] metricAggs, File outDir, IndexSpec indexSpec) throws IOException
IOException
public static List<String> getMergedDimensions(List<IndexableAdapter> indexes)
public File merge(List<IndexableAdapter> indexes, boolean rollup, AggregatorFactory[] metricAggs, File outDir, IndexSpec indexSpec, ProgressIndicator progress) throws IOException
IOException
public File convert(File inDir, File outDir, IndexSpec indexSpec) throws IOException
IOException
public File convert(File inDir, File outDir, IndexSpec indexSpec, ProgressIndicator progress) throws IOException
IOException
public File append(List<IndexableAdapter> indexes, AggregatorFactory[] aggregators, File outDir, IndexSpec indexSpec) throws IOException
IOException
public File append(List<IndexableAdapter> indexes, AggregatorFactory[] aggregators, File outDir, IndexSpec indexSpec, ProgressIndicator progress) throws IOException
IOException
protected File makeIndexFiles(List<IndexableAdapter> indexes, AggregatorFactory[] metricAggs, File outDir, ProgressIndicator progress, List<String> mergedDimensions, List<String> mergedMetrics, com.google.common.base.Function<ArrayList<Iterable<Rowboat>>,Iterable<Rowboat>> rowMergerFn, IndexSpec indexSpec) throws IOException
IOException
protected DimensionHandler[] makeDimensionHandlers(List<String> mergedDimensions, List<ColumnCapabilitiesImpl> dimCapabilities)
protected Iterable<Rowboat> makeRowIterable(List<IndexableAdapter> indexes, List<String> mergedDimensions, List<String> mergedMetrics, com.google.common.base.Function<ArrayList<Iterable<Rowboat>>,Iterable<Rowboat>> rowMergerFn, List<ColumnCapabilitiesImpl> dimCapabilities, DimensionHandler[] handlers, List<DimensionMerger> mergers)
public static <T extends Comparable> ArrayList<T> mergeIndexed(List<Iterable<T>> indexedLists)
public void createIndexDrdFile(byte versionId, File inDir, GenericIndexed<String> availableDimensions, GenericIndexed<String> availableMetrics, org.joda.time.Interval dataInterval, BitmapSerdeFactory bitmapSerdeFactory) throws IOException
IOException
Copyright © 2011–2017. All rights reserved.