private static QueryableIndex makeMergedQueryableIndex(IndexSpec indexSpec) IncrementalIndex first = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(1000) .buildOnheap(); IncrementalIndex second = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(1000) .buildOnheap(); IncrementalIndex third = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(NUM_POINTS) .buildOnheap();
index = new IncrementalIndex.Builder() .setIndexSchema(indexSchema) .setDeserializeComplexMetrics(false) .setConcurrentEventAdd(true) .setSortFacts(sortResults) .setMaxRowCount(querySpecificConfig.getMaxResults()) .buildOffheap(bufferPool); } else { index = new IncrementalIndex.Builder() .setIndexSchema(indexSchema) .setDeserializeComplexMetrics(false) .setConcurrentEventAdd(true) .setSortFacts(sortResults) .setMaxRowCount(querySpecificConfig.getMaxResults()) .buildOnheap();
.withRollup(schema.getGranularitySpec().isRollup()) .build(); final IncrementalIndex newIndex = new IncrementalIndex.Builder() .setIndexSchema(indexSchema) .setReportParseExceptions(reportParseExceptions) .setMaxRowCount(maxRowsInMemory) .setMaxBytesInMemory(maxBytesInMemory) .buildOnheap();
index = new IncrementalIndex.Builder() .setIndexSchema(indexSchema) .setDeserializeComplexMetrics(false) .setConcurrentEventAdd(true) .setSortFacts(sortResults) .setMaxRowCount(querySpecificConfig.getMaxResults()) .buildOffheap(bufferPool); } else { index = new IncrementalIndex.Builder() .setIndexSchema(indexSchema) .setDeserializeComplexMetrics(false) .setConcurrentEventAdd(true) .setSortFacts(sortResults) .setMaxRowCount(querySpecificConfig.getMaxResults()) .buildOnheap();
.withRollup(schema.getGranularitySpec().isRollup()) .build(); final IncrementalIndex newIndex = new IncrementalIndex.Builder() .setIndexSchema(indexSchema) .setReportParseExceptions(reportParseExceptions) .setMaxRowCount(maxRowsInMemory) .setMaxBytesInMemory(maxBytesInMemory) .buildOnheap();
private static IncrementalIndex makeIncrementalIndex( Bucket theBucket, AggregatorFactory[] aggs, HadoopDruidIndexerConfig config, Iterable<String> oldDimOrder, Map<String, ColumnCapabilitiesImpl> oldCapabilities ) { final HadoopTuningConfig tuningConfig = config.getSchema().getTuningConfig(); final IncrementalIndexSchema indexSchema = new IncrementalIndexSchema.Builder() .withMinTimestamp(theBucket.time.getMillis()) .withTimestampSpec(config.getSchema().getDataSchema().getParser().getParseSpec().getTimestampSpec()) .withDimensionsSpec(config.getSchema().getDataSchema().getParser()) .withQueryGranularity(config.getSchema().getDataSchema().getGranularitySpec().getQueryGranularity()) .withMetrics(aggs) .withRollup(config.getSchema().getDataSchema().getGranularitySpec().isRollup()) .build(); IncrementalIndex newIndex = new IncrementalIndex.Builder() .setIndexSchema(indexSchema) .setReportParseExceptions(!tuningConfig.isIgnoreInvalidRows()) // only used by OffHeapIncrementalIndex .setMaxRowCount(tuningConfig.getRowFlushBoundary()) .setMaxBytesInMemory(TuningConfigs.getMaxBytesInMemoryOrDefault(tuningConfig.getMaxBytesInMemory())) .buildOnheap(); if (oldDimOrder != null && !indexSchema.getDimensionsSpec().hasCustomDimensions()) { newIndex.loadDimensionIterable(oldDimOrder, oldCapabilities); } return newIndex; }
/** * A helper method to set a simple index schema with only metrics and default values for the other parameters. Note * that this method is normally used for testing and benchmarking; it is unlikely that you would use it in * production settings. * * @param metrics variable array of {@link AggregatorFactory} metrics * * @return this */ @VisibleForTesting public Builder setSimpleTestingIndexSchema(final AggregatorFactory... metrics) { return setSimpleTestingIndexSchema(null, metrics); }
index = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(minTimestamp) .build() .setDeserializeComplexMetrics(deserializeComplexMetrics) .setMaxRowCount(maxRowCount) .buildOnheap(); indexMerger.persist(index, tmp, new IndexSpec(), null); index.close(); index = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(minTimestamp) .build() .setDeserializeComplexMetrics(deserializeComplexMetrics) .setMaxRowCount(maxRowCount) .buildOnheap();
final IncrementalIndex index = new IncrementalIndex.Builder() .setIndexSchema(schema) .setMaxRowCount(MAX_ROWS * MAX_SHARD_NUMBER) .buildOnheap();
IncrementalIndex first = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(NUM_POINTS) .buildOnheap(); IncrementalIndex second = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(NUM_POINTS) .buildOnheap(); IncrementalIndex third = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(NUM_POINTS) .buildOnheap();
IncrementalIndex first = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(1000) .buildOnheap(); IncrementalIndex second = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(1000) .buildOnheap(); IncrementalIndex third = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(NUM_POINTS) .buildOnheap();
private static IncrementalIndex makeIncrementalIndex() throws IOException IncrementalIndex theIndex = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(NUM_POINTS) .buildOnheap();
IncrementalIndex toPersistA = new IncrementalIndex.Builder() .setIndexSchema(indexSchema) .setMaxRowCount(1000) .buildOnheap(); IncrementalIndex toPersistB = new IncrementalIndex.Builder() .setIndexSchema(indexSchema) .setMaxRowCount(1000) .buildOnheap();
private static IncrementalIndex makeIncrementalIndex() throws IOException IncrementalIndex theIndex = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(NUM_POINTS) .buildOnheap();
addDimValuesToIndex(toPersistBA, "dimA", Arrays.asList("1", "2")); IncrementalIndex toPersistBA2 = new IncrementalIndex.Builder() .setSimpleTestingIndexSchema(new CountAggregatorFactory("count")) .setMaxRowCount(1000) .buildOnheap();
.withRollup(false) .build(); IncrementalIndex toPersistA = new IncrementalIndex.Builder() .setIndexSchema(indexSchema) .setMaxRowCount(1000) .buildOnheap(); IncrementalIndex toPersistB = new IncrementalIndex.Builder() .setIndexSchema(indexSchema) .setMaxRowCount(1000) .buildOnheap();
private static IncrementalIndex makeIncrementalIndex() throws IOException IncrementalIndex theIndex = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withMinTimestamp(DATA_INTERVAL.getStartMillis()) .setReportParseExceptions(false) .setMaxRowCount(NUM_POINTS) .buildOnheap();
String client_type = "client_type"; IncrementalIndex index = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withQueryGranularity(Granularities.SECOND) .setMaxRowCount(1000) .buildOnheap();
String client_type = "client_type"; IncrementalIndex index = new IncrementalIndex.Builder() .setIndexSchema( new IncrementalIndexSchema.Builder() .withQueryGranularity(Granularities.SECOND) .setMaxRowCount(1000) .buildOnheap();
IncrementalIndex toPersist1 = new IncrementalIndex.Builder() .setIndexSchema(schema) .setMaxRowCount(1000) .buildOnheap(); IncrementalIndex toPersist2 = new IncrementalIndex.Builder() .setIndexSchema(schema) .setMaxRowCount(1000) .buildOnheap(); IncrementalIndex toPersist3 = new IncrementalIndex.Builder() .setIndexSchema(schema) .setMaxRowCount(1000) .buildOnheap();