Search in sources :

Example 1 with RamAccounting

use of io.crate.breaker.RamAccounting in project crate by crate.

the class WindowProjector method fromProjection.

public static Projector fromProjection(WindowAggProjection projection, NodeContext nodeCtx, InputFactory inputFactory, TransactionContext txnCtx, RamAccounting ramAccounting, MemoryManager memoryManager, Version minNodeVersion, Version indexVersionCreated, IntSupplier numThreads, Executor executor) {
    var windowFunctionSymbols = projection.windowFunctions();
    var numWindowFunctions = windowFunctionSymbols.size();
    assert numWindowFunctions > 0 : "WindowAggProjection must have at least 1 window function.";
    ArrayList<WindowFunction> windowFunctions = new ArrayList<>(numWindowFunctions);
    ArrayList<CollectExpression<Row, ?>> windowFuncArgsExpressions = new ArrayList<>(numWindowFunctions);
    Input[][] windowFuncArgsInputs = new Input[numWindowFunctions][];
    Boolean[] ignoreNulls = new Boolean[numWindowFunctions];
    for (int idx = 0; idx < numWindowFunctions; idx++) {
        var windowFunctionSymbol = windowFunctionSymbols.get(idx);
        InputFactory.Context<CollectExpression<Row, ?>> ctx = inputFactory.ctxForInputColumns(txnCtx);
        ctx.add(windowFunctionSymbol.arguments());
        FunctionImplementation impl = nodeCtx.functions().getQualified(windowFunctionSymbol, txnCtx.sessionSettings().searchPath());
        assert impl != null : "Function implementation not found using full qualified lookup";
        if (impl instanceof AggregationFunction) {
            var filterInputFactoryCtx = inputFactory.ctxForInputColumns(txnCtx);
            var filterSymbol = windowFunctionSymbol.filter();
            // noinspection unchecked
            Input<Boolean> filterInput = filterSymbol == null ? Literal.BOOLEAN_TRUE : (Input<Boolean>) filterInputFactoryCtx.add(filterSymbol);
            ExpressionsInput<Row, Boolean> filter = new ExpressionsInput<>(filterInput, filterInputFactoryCtx.expressions());
            windowFunctions.add(new AggregateToWindowFunctionAdapter((AggregationFunction) impl, filter, indexVersionCreated, ramAccounting, memoryManager, minNodeVersion));
        } else if (impl instanceof WindowFunction) {
            windowFunctions.add((WindowFunction) impl);
        } else {
            throw new AssertionError("Function needs to be either a window or an aggregate function");
        }
        windowFuncArgsExpressions.addAll(ctx.expressions());
        windowFuncArgsInputs[idx] = ctx.topLevelInputs().toArray(new Input[0]);
        ignoreNulls[idx] = windowFunctionSymbol.ignoreNulls();
    }
    var windowDefinition = projection.windowDefinition();
    var partitions = windowDefinition.partitions();
    Supplier<InputFactory.Context<CollectExpression<Row, ?>>> createInputFactoryContext = () -> inputFactory.ctxForInputColumns(txnCtx);
    int arrayListElementOverHead = 32;
    RowAccountingWithEstimators accounting = new RowAccountingWithEstimators(Symbols.typeView(projection.standalone()), ramAccounting, arrayListElementOverHead);
    Comparator<Object[]> cmpPartitionBy = partitions.isEmpty() ? null : createComparator(createInputFactoryContext, new OrderBy(windowDefinition.partitions()));
    Comparator<Object[]> cmpOrderBy = createComparator(createInputFactoryContext, windowDefinition.orderBy());
    int numCellsInSourceRow = projection.standalone().size();
    ComputeFrameBoundary<Object[]> computeFrameStart = createComputeStartFrameBoundary(numCellsInSourceRow, txnCtx, nodeCtx, windowDefinition, cmpOrderBy);
    ComputeFrameBoundary<Object[]> computeFrameEnd = createComputeEndFrameBoundary(numCellsInSourceRow, txnCtx, nodeCtx, windowDefinition, cmpOrderBy);
    return sourceRows -> WindowFunctionBatchIterator.of(sourceRows, accounting, computeFrameStart, computeFrameEnd, cmpPartitionBy, cmpOrderBy, numCellsInSourceRow, numThreads, executor, windowFunctions, windowFuncArgsExpressions, ignoreNulls, windowFuncArgsInputs);
}
Also used : Input(io.crate.data.Input) TransactionContext(io.crate.metadata.TransactionContext) InputColumn(io.crate.expression.symbol.InputColumn) WindowFrame(io.crate.sql.tree.WindowFrame) BiFunction(java.util.function.BiFunction) RowAccountingWithEstimators(io.crate.breaker.RowAccountingWithEstimators) CollectExpression(io.crate.execution.engine.collect.CollectExpression) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) Projector(io.crate.data.Projector) IntervalType(io.crate.types.IntervalType) Symbols(io.crate.expression.symbol.Symbols) Nullable(javax.annotation.Nullable) IntSupplier(java.util.function.IntSupplier) NodeContext(io.crate.metadata.NodeContext) Executor(java.util.concurrent.Executor) AggregationFunction(io.crate.execution.engine.aggregation.AggregationFunction) SymbolType(io.crate.expression.symbol.SymbolType) Comparators.createComparator(io.crate.execution.engine.sort.Comparators.createComparator) DataType(io.crate.types.DataType) SymbolEvaluator.evaluateWithoutParams(io.crate.analyze.SymbolEvaluator.evaluateWithoutParams) MemoryManager(io.crate.memory.MemoryManager) RamAccounting(io.crate.breaker.RamAccounting) ExpressionsInput(io.crate.expression.ExpressionsInput) List(java.util.List) OrderBy(io.crate.analyze.OrderBy) Version(org.elasticsearch.Version) Row(io.crate.data.Row) Literal(io.crate.expression.symbol.Literal) WindowDefinition(io.crate.analyze.WindowDefinition) WindowAggProjection(io.crate.execution.dsl.projection.WindowAggProjection) Symbol(io.crate.expression.symbol.Symbol) FunctionImplementation(io.crate.metadata.FunctionImplementation) InputFactory(io.crate.expression.InputFactory) Comparator(java.util.Comparator) InputFactory(io.crate.expression.InputFactory) ArrayList(java.util.ArrayList) AggregationFunction(io.crate.execution.engine.aggregation.AggregationFunction) Input(io.crate.data.Input) ExpressionsInput(io.crate.expression.ExpressionsInput) RowAccountingWithEstimators(io.crate.breaker.RowAccountingWithEstimators) FunctionImplementation(io.crate.metadata.FunctionImplementation) TransactionContext(io.crate.metadata.TransactionContext) NodeContext(io.crate.metadata.NodeContext) OrderBy(io.crate.analyze.OrderBy) CollectExpression(io.crate.execution.engine.collect.CollectExpression) Row(io.crate.data.Row) ExpressionsInput(io.crate.expression.ExpressionsInput)

Example 2 with RamAccounting

use of io.crate.breaker.RamAccounting in project crate by crate.

the class JobSetup method registerContextPhases.

private void registerContextPhases(Iterable<? extends NodeOperation> nodeOperations, Context context) {
    for (NodeOperation nodeOperation : nodeOperations) {
        // context for nodeOperations without dependencies can be built immediately (e.g. FetchPhase)
        if (nodeOperation.downstreamExecutionPhaseId() == NodeOperation.NO_DOWNSTREAM) {
            LOGGER.trace("Building context for nodeOp without downstream: {}", nodeOperation);
            createContexts(nodeOperation.executionPhase(), context);
            context.opCtx.builtNodeOperations.set(nodeOperation.executionPhase().phaseId());
        }
        if (ExecutionPhases.hasDirectResponseDownstream(nodeOperation.downstreamNodes())) {
            var executionPhase = nodeOperation.executionPhase();
            CircuitBreaker breaker = breaker();
            int ramAccountingBlockSizeInBytes = BlockBasedRamAccounting.blockSizeInBytes(breaker.getLimit());
            var ramAccounting = new BlockBasedRamAccounting(b -> breaker.addEstimateBytesAndMaybeBreak(b, executionPhase.label()), ramAccountingBlockSizeInBytes);
            Streamer<?>[] streamers = StreamerVisitor.streamersFromOutputs(executionPhase);
            SingleBucketBuilder bucketBuilder = new SingleBucketBuilder(streamers, ramAccounting);
            context.directResponseFutures.add(bucketBuilder.completionFuture().whenComplete((res, err) -> ramAccounting.close()));
            context.registerBatchConsumer(nodeOperation.downstreamExecutionPhaseId(), bucketBuilder);
        }
    }
}
Also used : ShardId(org.elasticsearch.index.shard.ShardId) DistributionType(io.crate.planner.distribution.DistributionType) SessionSettings(io.crate.metadata.settings.SessionSettings) FetchPhase(io.crate.execution.dsl.phases.FetchPhase) EvaluatingNormalizer(io.crate.expression.eval.EvaluatingNormalizer) Projections.nodeProjections(io.crate.execution.dsl.projection.Projections.nodeProjections) MapSideDataCollectOperation(io.crate.execution.engine.collect.MapSideDataCollectOperation) ProjectorFactory(io.crate.execution.engine.pipeline.ProjectorFactory) BlockBasedRamAccounting(io.crate.breaker.BlockBasedRamAccounting) Projections.shardProjections(io.crate.execution.dsl.projection.Projections.shardProjections) IntArrayList(com.carrotsearch.hppc.IntArrayList) Map(java.util.Map) Collector(java.util.stream.Collector) IntIndexedContainer(com.carrotsearch.hppc.IntIndexedContainer) ProjectingRowConsumer(io.crate.execution.engine.pipeline.ProjectingRowConsumer) PKLookupOperation(io.crate.execution.engine.collect.PKLookupOperation) RoutedCollectPhase(io.crate.execution.dsl.phases.RoutedCollectPhase) AggregationProjection(io.crate.execution.dsl.projection.AggregationProjection) Logger(org.apache.logging.log4j.Logger) Row(io.crate.data.Row) ExecutionPhase(io.crate.execution.dsl.phases.ExecutionPhase) IntObjectCursor(com.carrotsearch.hppc.cursors.IntObjectCursor) Tuple(io.crate.common.collections.Tuple) NestedLoopOperation(io.crate.execution.engine.join.NestedLoopOperation) ClusterService(org.elasticsearch.cluster.service.ClusterService) Operation(io.crate.metadata.table.Operation) CircuitBreakerService(org.elasticsearch.indices.breaker.CircuitBreakerService) ArrayList(java.util.ArrayList) Routing(io.crate.metadata.Routing) RowCellsAccountingWithEstimators(io.crate.breaker.RowCellsAccountingWithEstimators) CircuitBreaker(org.elasticsearch.common.breaker.CircuitBreaker) IndicesService(org.elasticsearch.indices.IndicesService) LongObjectHashMap(com.carrotsearch.hppc.LongObjectHashMap) Nullable(javax.annotation.Nullable) Executor(java.util.concurrent.Executor) SystemCollectSource(io.crate.execution.engine.collect.sources.SystemCollectSource) RamAccounting(io.crate.breaker.RamAccounting) IncrementalPageBucketReceiver(io.crate.execution.IncrementalPageBucketReceiver) ConcurrentRamAccounting(io.crate.breaker.ConcurrentRamAccounting) HierarchyCircuitBreakerService(org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService) IntObjectHashMap(com.carrotsearch.hppc.IntObjectHashMap) Schemas(io.crate.metadata.Schemas) NodeOperation(io.crate.execution.dsl.phases.NodeOperation) AggregationPipe(io.crate.execution.engine.aggregation.AggregationPipe) InputFactory(io.crate.expression.InputFactory) MemoryManagerFactory(io.crate.memory.MemoryManagerFactory) TransactionContext(io.crate.metadata.TransactionContext) PKAndVersion(io.crate.planner.operators.PKAndVersion) HashJoinPhase(io.crate.execution.dsl.phases.HashJoinPhase) IntCursor(com.carrotsearch.hppc.cursors.IntCursor) MergePhase(io.crate.execution.dsl.phases.MergePhase) Settings(org.elasticsearch.common.settings.Settings) DistributingConsumerFactory(io.crate.execution.engine.distribution.DistributingConsumerFactory) Locale(java.util.Locale) ThreadPool(org.elasticsearch.threadpool.ThreadPool) LongObjectMap(com.carrotsearch.hppc.LongObjectMap) NodeContext(io.crate.metadata.NodeContext) HashJoinOperation(io.crate.execution.engine.join.HashJoinOperation) Streamer(io.crate.Streamer) Predicate(java.util.function.Predicate) Collection(java.util.Collection) IntContainer(com.carrotsearch.hppc.IntContainer) NestedLoopPhase(io.crate.execution.dsl.phases.NestedLoopPhase) UUID(java.util.UUID) CollectTask(io.crate.execution.engine.collect.CollectTask) Objects(java.util.Objects) List(java.util.List) ExecutionPhaseVisitor(io.crate.execution.dsl.phases.ExecutionPhaseVisitor) Projection(io.crate.execution.dsl.projection.Projection) DataTypes(io.crate.types.DataTypes) Singleton(org.elasticsearch.common.inject.Singleton) Paging(io.crate.data.Paging) FetchTask(io.crate.execution.engine.fetch.FetchTask) StreamBucket(io.crate.execution.engine.distribution.StreamBucket) SingleBucketBuilder(io.crate.execution.engine.distribution.SingleBucketBuilder) RowAccountingWithEstimators(io.crate.breaker.RowAccountingWithEstimators) CompletableFuture(java.util.concurrent.CompletableFuture) CountPhase(io.crate.execution.dsl.phases.CountPhase) Inject(org.elasticsearch.common.inject.Inject) ObjectProcedure(com.carrotsearch.hppc.procedures.ObjectProcedure) Node(org.elasticsearch.node.Node) CollectPhase(io.crate.execution.dsl.phases.CollectPhase) PKLookupPhase(io.crate.execution.dsl.phases.PKLookupPhase) UpstreamPhase(io.crate.execution.dsl.phases.UpstreamPhase) CountOperation(io.crate.execution.engine.collect.count.CountOperation) GroupProjection(io.crate.execution.dsl.projection.GroupProjection) StreamerVisitor(io.crate.planner.node.StreamerVisitor) IntHashSet(com.carrotsearch.hppc.IntHashSet) ShardCollectSource(io.crate.execution.engine.collect.sources.ShardCollectSource) IntCollection(com.carrotsearch.hppc.IntCollection) GroupingProjector(io.crate.execution.engine.aggregation.GroupingProjector) ProjectionToProjectorVisitor(io.crate.execution.engine.pipeline.ProjectionToProjectorVisitor) MemoryManager(io.crate.memory.MemoryManager) TransportActionProvider(io.crate.execution.TransportActionProvider) PagingIterator(io.crate.execution.engine.distribution.merge.PagingIterator) IntObjectMap(com.carrotsearch.hppc.IntObjectMap) RowConsumer(io.crate.data.RowConsumer) RowFilter(io.crate.expression.RowFilter) BitSet(java.util.BitSet) ExecutionPhases(io.crate.execution.dsl.phases.ExecutionPhases) LogManager(org.apache.logging.log4j.LogManager) CircuitBreaker(org.elasticsearch.common.breaker.CircuitBreaker) BlockBasedRamAccounting(io.crate.breaker.BlockBasedRamAccounting) Streamer(io.crate.Streamer) NodeOperation(io.crate.execution.dsl.phases.NodeOperation) SingleBucketBuilder(io.crate.execution.engine.distribution.SingleBucketBuilder)

Example 3 with RamAccounting

use of io.crate.breaker.RamAccounting in project crate by crate.

the class FetchProjector method create.

public static Projector create(FetchProjection projection, RamAccounting ramAccounting, LongSupplier getBucketsBytesThreshold, TransactionContext txnCtx, NodeContext nodeCtx, FetchOperation fetchOperation) {
    final FetchRows fetchRows = FetchRows.create(txnCtx, nodeCtx, projection.fetchSources(), projection.outputSymbols());
    EstimateCellsSize estimateRowSize = new EstimateCellsSize(projection.inputTypes());
    return (BatchIterator<Row> source) -> {
        final long maxBucketsSizeInBytes = getBucketsBytesThreshold.getAsLong();
        BatchIterator<ReaderBuckets> buckets = BatchIterators.partition(source, projection.getFetchSize(), () -> new ReaderBuckets(fetchRows, projection::getFetchSourceByReader, estimateRowSize, ramAccounting), ReaderBuckets::add, readerBuckets -> readerBuckets.ramBytesUsed() > maxBucketsSizeInBytes);
        return new AsyncFlatMapBatchIterator<>(buckets, new FetchMapper(fetchOperation, projection.nodeReaders()));
    };
}
Also used : TransactionContext(io.crate.metadata.TransactionContext) ByteSizeUnit(org.elasticsearch.common.unit.ByteSizeUnit) NodeContext(io.crate.metadata.NodeContext) LongSupplier(java.util.function.LongSupplier) BatchIterator(io.crate.data.BatchIterator) RamAccounting(io.crate.breaker.RamAccounting) Projector(io.crate.data.Projector) EstimateCellsSize(io.crate.breaker.EstimateCellsSize) BatchIterators(io.crate.data.BatchIterators) Row(io.crate.data.Row) AsyncFlatMapBatchIterator(io.crate.data.AsyncFlatMapBatchIterator) CircuitBreaker(org.elasticsearch.common.breaker.CircuitBreaker) FetchProjection(io.crate.execution.dsl.projection.FetchProjection) EstimateCellsSize(io.crate.breaker.EstimateCellsSize) BatchIterator(io.crate.data.BatchIterator) AsyncFlatMapBatchIterator(io.crate.data.AsyncFlatMapBatchIterator) Row(io.crate.data.Row)

Example 4 with RamAccounting

use of io.crate.breaker.RamAccounting in project crate by crate.

the class HyperLogLogDistinctAggregation method getDocValueAggregator.

@Nullable
@Override
public DocValueAggregator<?> getDocValueAggregator(List<Reference> aggregationReferences, DocTableInfo table, List<Literal<?>> optionalParams) {
    if (aggregationReferences.stream().anyMatch(x -> !x.hasDocValues())) {
        return null;
    }
    Reference reference = aggregationReferences.get(0);
    var dataType = reference.valueType();
    switch(dataType.id()) {
        case ByteType.ID:
        case ShortType.ID:
        case IntegerType.ID:
        case LongType.ID:
        case TimestampType.ID_WITH_TZ:
        case TimestampType.ID_WITHOUT_TZ:
            return new SortedNumericDocValueAggregator<>(reference.column().fqn(), (ramAccounting, memoryManager, minNodeVersion) -> {
                var state = new HllState(dataType, minNodeVersion.onOrAfter(Version.V_4_1_0));
                var precision = optionalParams.size() == 1 ? (Integer) optionalParams.get(0).value() : HyperLogLogPlusPlus.DEFAULT_PRECISION;
                return initIfNeeded(state, memoryManager, precision);
            }, (values, state) -> {
                var hash = BitMixer.mix64(values.nextValue());
                state.addHash(hash);
            });
        case DoubleType.ID:
            return new SortedNumericDocValueAggregator<>(reference.column().fqn(), (ramAccounting, memoryManager, minNodeVersion) -> {
                var state = new HllState(dataType, minNodeVersion.onOrAfter(Version.V_4_1_0));
                var precision = optionalParams.size() == 1 ? (Integer) optionalParams.get(0).value() : HyperLogLogPlusPlus.DEFAULT_PRECISION;
                return initIfNeeded(state, memoryManager, precision);
            }, (values, state) -> {
                // Murmur3Hash.Double in regular aggregation calls mix64 of doubleToLongBits(double value).
                // Equivalent of that in context of double DocValue is
                // mix64(doubleToLongBits(decoded))
                // => mix64(doubleToLongBits(NumericUtils.sortableLongToDouble(values.nextValue())))
                // => mix64(doubleToLongBits(Double.longBitsToDouble(sortableDoubleBits(values.nextValue()))))
                // => mix64(sortableDoubleBits(values.nextValue()))
                var hash = BitMixer.mix64(NumericUtils.sortableDoubleBits(values.nextValue()));
                state.addHash(hash);
            });
        case FloatType.ID:
            return new SortedNumericDocValueAggregator<>(reference.column().fqn(), (ramAccounting, memoryManager, minNodeVersion) -> {
                var state = new HllState(dataType, minNodeVersion.onOrAfter(Version.V_4_1_0));
                var precision = optionalParams.size() == 1 ? (Integer) optionalParams.get(0).value() : HyperLogLogPlusPlus.DEFAULT_PRECISION;
                return initIfNeeded(state, memoryManager, precision);
            }, (values, state) -> {
                // Murmur3Hash.Float in regular aggregation calls mix64 of doubleToLongBits(double value).
                // Equivalent of that in context of float DocValue is
                // mix64(doubleToLongBits(decoded))
                // => mix64(doubleToLongBits((double)NumericUtils.sortableIntToFloat((int)values.nextValue())))
                // => mix64(doubleToLongBits(NumericUtils.sortableIntToFloat((int)values.nextValue()))) - no need to double cast, auto widening
                var hash = BitMixer.mix64(doubleToLongBits(NumericUtils.sortableIntToFloat((int) values.nextValue())));
                state.addHash(hash);
            });
        case StringType.ID:
            var precision = optionalParams.size() == 1 ? (Integer) optionalParams.get(0).value() : HyperLogLogPlusPlus.DEFAULT_PRECISION;
            return new HllAggregator(reference.column().fqn(), dataType, precision) {

                @Override
                public void apply(RamAccounting ramAccounting, int doc, HllState state) throws IOException {
                    if (super.values.advanceExact(doc) && super.values.docValueCount() == 1) {
                        BytesRef ref = super.values.nextValue();
                        var hash = state.isAllOn4_1() ? MurmurHash3.hash64(ref.bytes, ref.offset, ref.length) : MurmurHash3.hash128(ref.bytes, ref.offset, ref.length, 0, super.hash128).h1;
                        state.addHash(hash);
                    }
                }
            };
        case IpType.ID:
            var ipPrecision = optionalParams.size() == 1 ? (Integer) optionalParams.get(0).value() : HyperLogLogPlusPlus.DEFAULT_PRECISION;
            return new HllAggregator(reference.column().fqn(), dataType, ipPrecision) {

                @Override
                public void apply(RamAccounting ramAccounting, int doc, HllState state) throws IOException {
                    if (super.values.advanceExact(doc) && super.values.docValueCount() == 1) {
                        BytesRef ref = super.values.nextValue();
                        byte[] bytes = ((String) DocValueFormat.IP.format(ref)).getBytes(StandardCharsets.UTF_8);
                        var hash = state.isAllOn4_1() ? MurmurHash3.hash64(bytes, 0, bytes.length) : MurmurHash3.hash128(bytes, 0, bytes.length, 0, super.hash128).h1;
                        state.addHash(hash);
                    }
                }
            };
        default:
            return null;
    }
}
Also used : RamAccounting(io.crate.breaker.RamAccounting) Reference(io.crate.metadata.Reference) SortedNumericDocValueAggregator(io.crate.execution.engine.aggregation.impl.templates.SortedNumericDocValueAggregator) BytesRef(org.apache.lucene.util.BytesRef) Nullable(javax.annotation.Nullable)

Example 5 with RamAccounting

use of io.crate.breaker.RamAccounting in project crate by crate.

the class WindowBatchIteratorTest method testWindowBatchIteratorAccountsUsedMemory.

@Test
public void testWindowBatchIteratorAccountsUsedMemory() {
    RamAccounting ramAccounting = ConcurrentRamAccounting.forCircuitBreaker("test", new NoopCircuitBreaker("dummy"));
    BatchIterator<Row> iterator = WindowFunctionBatchIterator.of(TestingBatchIterators.range(0, 10), new RowAccountingWithEstimators(List.of(DataTypes.INTEGER), ramAccounting, 32), (partitionStart, partitionEnd, currentIndex, sortedRows) -> 0, (partitionStart, partitionEnd, currentIndex, sortedRows) -> currentIndex, null, null, 1, () -> 1, Runnable::run, List.of(rowNumberWindowFunction()), List.of(), new Boolean[] { null }, new Input[][] { new Input[0] });
    TestingRowConsumer consumer = new TestingRowConsumer();
    consumer.accept(iterator, null);
    // should've accounted for 10 integers of 48 bytes each (16 for the integer, 32 for the ArrayList element)
    assertThat(ramAccounting.totalBytes(), is(480L));
}
Also used : RamAccounting(io.crate.breaker.RamAccounting) ConcurrentRamAccounting(io.crate.breaker.ConcurrentRamAccounting) RowAccountingWithEstimators(io.crate.breaker.RowAccountingWithEstimators) Row(io.crate.data.Row) NoopCircuitBreaker(org.elasticsearch.common.breaker.NoopCircuitBreaker) TestingRowConsumer(io.crate.testing.TestingRowConsumer) Test(org.junit.Test)

Aggregations

RamAccounting (io.crate.breaker.RamAccounting)14 BlockBasedRamAccounting (io.crate.breaker.BlockBasedRamAccounting)7 Row (io.crate.data.Row)6 Nullable (javax.annotation.Nullable)6 CircuitBreaker (org.elasticsearch.common.breaker.CircuitBreaker)6 RowAccountingWithEstimators (io.crate.breaker.RowAccountingWithEstimators)4 ArrayList (java.util.ArrayList)4 CompletableFuture (java.util.concurrent.CompletableFuture)4 Test (org.junit.Test)4 IntArrayList (com.carrotsearch.hppc.IntArrayList)3 IntObjectHashMap (com.carrotsearch.hppc.IntObjectHashMap)3 Streamer (io.crate.Streamer)3 ConcurrentRamAccounting (io.crate.breaker.ConcurrentRamAccounting)3 BatchIterator (io.crate.data.BatchIterator)3 NodeContext (io.crate.metadata.NodeContext)3 TransactionContext (io.crate.metadata.TransactionContext)3 List (java.util.List)3 IntObjectMap (com.carrotsearch.hppc.IntObjectMap)2 IntObjectCursor (com.carrotsearch.hppc.cursors.IntObjectCursor)2 Projector (io.crate.data.Projector)2