@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public void addRows(Blackhole blackhole) throws Exception { for (int i = 0; i < rowsPerSegment; i++) { InputRow row = rows.get(i); int rv = incIndex.add(row).getRowCount(); blackhole.consume(rv); } } }
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) @OperationsPerInvocation(maxRows) public void normalLongs(Blackhole blackhole) throws Exception { for (int i = 0; i < maxRows; i++) { InputRow row = longRows.get(i); int rv = incIndex.add(row).getRowCount(); blackhole.consume(rv); } }
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) @OperationsPerInvocation(maxRows) public void normalFloats(Blackhole blackhole) throws Exception { for (int i = 0; i < maxRows; i++) { InputRow row = floatRows.get(i); int rv = incFloatIndex.add(row).getRowCount(); blackhole.consume(rv); } }
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) @OperationsPerInvocation(maxRows) public void normalStrings(Blackhole blackhole) throws Exception { for (int i = 0; i < maxRows; i++) { InputRow row = stringRows.get(i); int rv = incStrIndex.add(row).getRowCount(); blackhole.consume(rv); } } }
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public void ingest(Blackhole blackhole) throws Exception { incIndexFilteredAgg = makeIncIndex(filteredMetrics); for (InputRow row : inputRows) { int rv = incIndexFilteredAgg.add(row).getRowCount(); blackhole.consume(rv); } }
sinkRowsInMemoryAfterAdd = addResult.getRowCount(); bytesInMemoryAfterAdd = addResult.getBytesInMemory();
if (addResult.getRowCount() == -1) { metrics.incrementThrownAway(); log.debug("Discarded row[%s], considering thrownAway due to %s.", inputRow, addResult.getReasonOfNotAdded()); if (addResult.getRowCount() == -2) { metrics.incrementDedup(); log.debug("Discarded row[%s], considering duplication.", inputRow);
int numRows = index.add(inputRow).getRowCount();
AppenderatorTest.IR("2000", "bar", 2), AppenderatorTest.IR("2000", "qux", 4)}; Assert.assertEquals(1, plumber.add(rows[0], null).getRowCount()); Assert.assertEquals(2, plumber.add(rows[1], null).getRowCount()); Assert.assertEquals(3, plumber.add(rows[2], null).getRowCount());
ImmutableList.of("field", "dedupColumn"), ImmutableMap.of("field1", "value1", "dedupColumn", "v1") ), false).getRowCount(); Assert.assertTrue(rows > 0); ImmutableList.of("field", "dedupColumn"), ImmutableMap.of("field1", "value2") ), false).getRowCount(); Assert.assertTrue(rows > 0); ImmutableList.of("field", "dedupColumn"), ImmutableMap.of("field1", "value3") ), false).getRowCount(); Assert.assertTrue(rows > 0); ImmutableList.of("field", "dedupColumn"), ImmutableMap.of("field1", "value4", "dedupColumn", "v2") ), false).getRowCount(); Assert.assertTrue(rows > 0); ImmutableList.of("field", "dedupColumn"), ImmutableMap.of("field1", "value5", "dedupColumn", "v1") ), false).getRowCount(); Assert.assertTrue(rows == -2);
if (inputRow != null) { IncrementalIndexAddResult addResult = plumber.add(inputRow, committerSupplier); int numRows = addResult.getRowCount(); if (numRows == -2) { metrics.incrementDedup();
sinkRowsInMemoryAfterAdd = addResult.getRowCount(); bytesInMemoryAfterAdd = addResult.getBytesInMemory();
int numRows = index.add(inputRow).getRowCount();
if (addResult.getRowCount() == -1) { metrics.incrementThrownAway(); log.debug("Discarded row[%s], considering thrownAway due to %s.", inputRow, addResult.getReasonOfNotAdded()); if (addResult.getRowCount() == -2) { metrics.incrementDedup(); log.debug("Discarded row[%s], considering duplication.", inputRow);
if (inputRow != null) { IncrementalIndexAddResult addResult = plumber.add(inputRow, committerSupplier); int numRows = addResult.getRowCount(); if (numRows == -2) { metrics.incrementDedup();