Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public static class IncrementalIndexState
@Param({"onheap", "offheap"})
private String indexType;

IncrementalIndex<?> incIndex;
IncrementalIndex incIndex;

@Setup
public void setup(FilteredAggregatorBenchmark global) throws JsonProcessingException
Expand Down Expand Up @@ -237,7 +237,7 @@ public static class IncrementalIndexIngestState
@Param({"onheap", "offheap"})
private String indexType;

IncrementalIndex<?> incIndex;
IncrementalIndex incIndex;
List<InputRow> inputRows;

@Setup(Level.Invocation)
Expand Down Expand Up @@ -273,7 +273,7 @@ public void setup(FilteredAggregatorBenchmark global) throws IOException
{
global.appendableIndexSpec = new OnheapIncrementalIndex.Spec();

IncrementalIndex<?> incIndex = global.makeIncIndex(global.schemaInfo.getAggsArray());
IncrementalIndex incIndex = global.makeIncIndex(global.schemaInfo.getAggsArray());
global.generator.addToIndex(incIndex, global.rowsPerSegment);

qIndexesDir = FileUtils.createTempDir();
Expand Down Expand Up @@ -302,7 +302,7 @@ public void tearDown()
}
}

private IncrementalIndex<?> makeIncIndex(AggregatorFactory[] metrics)
private IncrementalIndex makeIncIndex(AggregatorFactory[] metrics)
{
return appendableIndexSpec.builder()
.setSimpleTestingIndexSchema(metrics)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class IncrementalIndexRowTypeBenchmark
private String indexType;

private AppendableIndexSpec appendableIndexSpec;
IncrementalIndex<?> incIndex;
IncrementalIndex incIndex;
private static AggregatorFactory[] aggs;
static final int DIMENSION_COUNT = 8;

Expand Down Expand Up @@ -131,7 +131,7 @@ private MapBasedInputRow getStringRow(long timestamp, int dimensionCount)
return new MapBasedInputRow(timestamp, dimensionList, builder.build());
}

private IncrementalIndex<?> makeIncIndex()
private IncrementalIndex makeIncIndex()
{
return appendableIndexSpec.builder()
.setSimpleTestingIndexSchema(aggs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public class IncrementalIndexReadBenchmark
}

private AppendableIndexSpec appendableIndexSpec;
private IncrementalIndex<?> incIndex;
private IncrementalIndex incIndex;
private GeneratorSchemaInfo schemaInfo;

@Setup
Expand Down Expand Up @@ -130,7 +130,7 @@ public void tearDown()
}
}

private IncrementalIndex<?> makeIncIndex()
private IncrementalIndex makeIncIndex()
{
return appendableIndexSpec.builder()
.setIndexSchema(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class IndexIngestionBenchmark
}

private AppendableIndexSpec appendableIndexSpec;
private IncrementalIndex<?> incIndex;
private IncrementalIndex incIndex;
private List<InputRow> rows;
private GeneratorSchemaInfo schemaInfo;

Expand Down Expand Up @@ -119,7 +119,7 @@ public void tearDown()
}
}

private IncrementalIndex<?> makeIncIndex()
private IncrementalIndex makeIncIndex()
{
return appendableIndexSpec.builder()
.setIndexSchema(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void setup() throws IOException
rowsPerSegment
);

IncrementalIndex<?> incIndex = makeIncIndex();
IncrementalIndex incIndex = makeIncIndex();

gen.addToIndex(incIndex, rowsPerSegment);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public class IndexPersistBenchmark
private String indexType;

private AppendableIndexSpec appendableIndexSpec;
private IncrementalIndex<?> incIndex;
private IncrementalIndex incIndex;
private List<InputRow> rows;
private GeneratorSchemaInfo schemaInfo;
private File tmpDir;
Expand Down Expand Up @@ -168,7 +168,7 @@ public void teardownTemp() throws IOException
FileUtils.deleteDirectory(tmpDir);
}

private IncrementalIndex<?> makeIncIndex()
private IncrementalIndex makeIncIndex()
{
return appendableIndexSpec.builder()
.setIndexSchema(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ public static class IncrementalIndexState
@Param({"onheap", "offheap"})
private String indexType;

IncrementalIndex<?> incIndex;
IncrementalIndex incIndex;

@Setup(Level.Trial)
public void setup(GroupByBenchmark global) throws JsonProcessingException
Expand Down Expand Up @@ -584,7 +584,7 @@ public void setup(GroupByBenchmark global) throws IOException
for (int i = 0; i < numSegments; i++) {
log.info("Generating rows for segment %d/%d", i + 1, numSegments);

final IncrementalIndex<?> incIndex = global.makeIncIndex(global.schemaInfo.isWithRollup());
final IncrementalIndex incIndex = global.makeIncIndex(global.schemaInfo.isWithRollup());
global.generator.reset(RNG_SEED + i).addToIndex(incIndex, global.rowsPerSegment);

log.info(
Expand Down Expand Up @@ -621,7 +621,7 @@ public void tearDown()
}
}

private IncrementalIndex<?> makeIncIndex(boolean withRollup)
private IncrementalIndex makeIncIndex(boolean withRollup)
{
return appendableIndexSpec.builder()
.setIndexSchema(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public static class IncrementalIndexState
@Param({"onheap", "offheap"})
private String indexType;

IncrementalIndex<?> incIndex;
IncrementalIndex incIndex;

@Setup
public void setup(ScanBenchmark global) throws JsonProcessingException
Expand Down Expand Up @@ -334,7 +334,7 @@ public void setup(ScanBenchmark global) throws IOException
for (int i = 0; i < numSegments; i++) {
log.info("Generating rows for segment " + i);

IncrementalIndex<?> incIndex = global.makeIncIndex();
IncrementalIndex incIndex = global.makeIncIndex();
global.generator.reset(RNG_SEED + i).addToIndex(incIndex, global.rowsPerSegment);

File indexFile = INDEX_MERGER_V9.persist(
Expand Down Expand Up @@ -363,7 +363,7 @@ public void tearDown()
}
}

private IncrementalIndex<?> makeIncIndex()
private IncrementalIndex makeIncIndex()
{
return appendableIndexSpec.builder()
.setSimpleTestingIndexSchema(schemaInfo.getAggsArray())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public static class IncrementalIndexState
@Param({"onheap", "offheap"})
private String indexType;

IncrementalIndex<?> incIndex;
IncrementalIndex incIndex;

@Setup
public void setup(SearchBenchmark global) throws JsonProcessingException
Expand Down Expand Up @@ -401,7 +401,7 @@ public void setup(SearchBenchmark global) throws IOException
for (int i = 0; i < numSegments; i++) {
log.info("Generating rows for segment " + i);

IncrementalIndex<?> incIndex = global.makeIncIndex();
IncrementalIndex incIndex = global.makeIncIndex();
global.generator.reset(RNG_SEED + i).addToIndex(incIndex, global.rowsPerSegment);

File indexFile = INDEX_MERGER_V9.persist(
Expand Down Expand Up @@ -430,7 +430,7 @@ public void tearDown()
}
}

private IncrementalIndex<?> makeIncIndex()
private IncrementalIndex makeIncIndex()
{
return appendableIndexSpec.builder()
.setSimpleTestingIndexSchema(schemaInfo.getAggsArray())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public static class IncrementalIndexState
@Param({"onheap", "offheap"})
private String indexType;

IncrementalIndex<?> incIndex;
IncrementalIndex incIndex;

@Setup
public void setup(TimeseriesBenchmark global) throws JsonProcessingException
Expand Down Expand Up @@ -326,7 +326,7 @@ public void setup(TimeseriesBenchmark global) throws IOException
for (int i = 0; i < numSegments; i++) {
log.info("Generating rows for segment " + i);

IncrementalIndex<?> incIndex = global.makeIncIndex();
IncrementalIndex incIndex = global.makeIncIndex();
global.generator.reset(RNG_SEED + i).addToIndex(incIndex, global.rowsPerSegment);

File indexFile = INDEX_MERGER_V9.persist(
Expand Down Expand Up @@ -355,7 +355,7 @@ public void tearDown()
}
}

private IncrementalIndex<?> makeIncIndex()
private IncrementalIndex makeIncIndex()
{
return appendableIndexSpec.builder()
.setSimpleTestingIndexSchema(schemaInfo.getAggsArray())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public static class IncrementalIndexState
@Param({"onheap", "offheap"})
private String indexType;

IncrementalIndex<?> incIndex;
IncrementalIndex incIndex;

@Setup
public void setup(TopNBenchmark global) throws JsonProcessingException
Expand Down Expand Up @@ -302,7 +302,7 @@ public void setup(TopNBenchmark global) throws IOException
for (int i = 0; i < numSegments; i++) {
log.info("Generating rows for segment " + i);

IncrementalIndex<?> incIndex = global.makeIncIndex();
IncrementalIndex incIndex = global.makeIncIndex();
global.generator.reset(RNG_SEED + i).addToIndex(incIndex, global.rowsPerSegment);

File indexFile = INDEX_MERGER_V9.persist(
Expand Down Expand Up @@ -331,7 +331,7 @@ public void tearDown()
}
}

private IncrementalIndex<?> makeIncIndex()
private IncrementalIndex makeIncIndex()
{
return appendableIndexSpec.builder()
.setSimpleTestingIndexSchema(schemaInfo.getAggsArray())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.apache.druid.java.util.common.io.Closer;
import org.apache.druid.java.util.common.parsers.CloseableIterator;
import org.apache.druid.java.util.common.parsers.ParseException;
import org.apache.druid.query.aggregation.Aggregator;
import org.apache.druid.query.aggregation.AggregatorFactory;
import org.apache.druid.query.aggregation.LongMinAggregatorFactory;
import org.apache.druid.segment.column.ColumnHolder;
Expand Down Expand Up @@ -114,7 +113,7 @@ public SamplerResponse sample(
tempDir
);
try (final CloseableIterator<InputRowListPlusRawValues> iterator = reader.sample();
final IncrementalIndex<Aggregator> index = buildIncrementalIndex(nonNullSamplerConfig, nonNullDataSchema);
final IncrementalIndex index = buildIncrementalIndex(nonNullSamplerConfig, nonNullDataSchema);
final Closer closer1 = closer) {
List<SamplerResponseRow> responseRows = new ArrayList<>(nonNullSamplerConfig.getNumRows());
int numRowsIndexed = 0;
Expand Down Expand Up @@ -226,7 +225,7 @@ private InputSourceReader buildReader(
return dataSchema.getTransformSpec().decorate(reader);
}

private IncrementalIndex<Aggregator> buildIncrementalIndex(SamplerConfig samplerConfig, DataSchema dataSchema)
private IncrementalIndex buildIncrementalIndex(SamplerConfig samplerConfig, DataSchema dataSchema)
{
final IncrementalIndexSchema schema = new IncrementalIndexSchema.Builder()
.withTimestampSpec(dataSchema.getTimestampSpec())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class DruidSegmentReaderTest extends NullHandlingTest
public void setUp() throws IOException
{
// Write a segment with two rows in it, with columns: s (string), d (double), cnt (long), met_s (complex).
final IncrementalIndex<?> incrementalIndex =
final IncrementalIndex incrementalIndex =
IndexBuilder.create()
.schema(
new IncrementalIndexSchema.Builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public T apply(Row input)
private void waitForFutureCompletion(
GroupByQuery query,
List<ListenableFuture<Void>> futures,
IncrementalIndex<?> closeOnFailure
IncrementalIndex closeOnFailure
)
{
ListenableFuture<List<Void>> future = Futures.allAsList(futures);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public static IncrementalIndex makeIncrementalIndex(
}

// Used by GroupByStrategyV1
public static Sequence<ResultRow> postAggregate(final GroupByQuery query, IncrementalIndex<?> index)
public static Sequence<ResultRow> postAggregate(final GroupByQuery query, IncrementalIndex index)
{
return Sequences.map(
Sequences.simple(index.iterableWithPostAggregations(query.getPostAggregatorSpecs(), query.isDescending())),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public InputRow get()
* @param stream the stream of rows to add
* @param index the index to add rows to
*/
public static void addStreamToIndex(Stream<InputRow> stream, IncrementalIndex<?> index)
public static void addStreamToIndex(Stream<InputRow> stream, IncrementalIndex index)
{
stream.forEachOrdered(row -> {
try {
Expand All @@ -207,7 +207,7 @@ public static void addStreamToIndex(Stream<InputRow> stream, IncrementalIndex<?>
* @param index the index to add rows to
* @param numOfRows the number of rows to add
*/
public void addToIndex(IncrementalIndex<?> index, int numOfRows)
public void addToIndex(IncrementalIndex index, int numOfRows)
{
addStreamToIndex(generator(numOfRows), index);
}
Expand Down
Loading