Search in sources :

Example 1 with LocalFsFileOutputFactory

use of io.crate.execution.engine.export.LocalFsFileOutputFactory in project crate by crate.

the class ProjectingRowConsumerTest method prepare.

@Before
public void prepare() {
    nodeCtx = createNodeContext();
    memoryManager = new OnHeapMemoryManager(usedBytes -> {
    });
    projectorFactory = new ProjectionToProjectorVisitor(clusterService, new NodeLimits(new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS)), new NoneCircuitBreakerService(), nodeCtx, THREAD_POOL, Settings.EMPTY, mock(TransportActionProvider.class, Answers.RETURNS_DEEP_STUBS), new InputFactory(nodeCtx), new EvaluatingNormalizer(nodeCtx, RowGranularity.SHARD, r -> Literal.ofUnchecked(r.valueType(), r.valueType().implicitCast("1")), null), t -> null, t -> null, Version.CURRENT, new ShardId("dummy", UUID.randomUUID().toString(), 0), Map.of(LocalFsFileOutputFactory.NAME, new LocalFsFileOutputFactory()));
}
Also used : ShardId(org.elasticsearch.index.shard.ShardId) TransactionContext(io.crate.metadata.TransactionContext) java.util(java.util) InputColumn(io.crate.expression.symbol.InputColumn) SENTINEL(io.crate.data.SentinelRow.SENTINEL) CompletableFuture(java.util.concurrent.CompletableFuture) BatchIterator(io.crate.data.BatchIterator) SearchPath(io.crate.metadata.SearchPath) EvaluatingNormalizer(io.crate.expression.eval.EvaluatingNormalizer) CrateDummyClusterServiceUnitTest(io.crate.test.integration.CrateDummyClusterServiceUnitTest) LocalFsFileOutputFactory(io.crate.execution.engine.export.LocalFsFileOutputFactory) NodeLimits(io.crate.execution.jobs.NodeLimits) Settings(org.elasticsearch.common.settings.Settings) NoneCircuitBreakerService(org.elasticsearch.indices.breaker.NoneCircuitBreakerService) UnhandledServerException(io.crate.exceptions.UnhandledServerException) TestingHelpers.createNodeContext(io.crate.testing.TestingHelpers.createNodeContext) Nullable(javax.annotation.Nullable) Before(org.junit.Before) NodeContext(io.crate.metadata.NodeContext) Answers(org.mockito.Answers) GroupProjection(io.crate.execution.dsl.projection.GroupProjection) FilterProjection(io.crate.execution.dsl.projection.FilterProjection) InMemoryBatchIterator(io.crate.data.InMemoryBatchIterator) Test(org.junit.Test) EqOperator(io.crate.expression.operator.EqOperator) Function(io.crate.expression.symbol.Function) RamAccounting(io.crate.breaker.RamAccounting) TransportActionProvider(io.crate.execution.TransportActionProvider) RowConsumer(io.crate.data.RowConsumer) WriterProjection(io.crate.execution.dsl.projection.WriterProjection) ClusterSettings(org.elasticsearch.common.settings.ClusterSettings) Version(org.elasticsearch.Version) RowGranularity(io.crate.metadata.RowGranularity) Row(io.crate.data.Row) Literal(io.crate.expression.symbol.Literal) Symbol(io.crate.expression.symbol.Symbol) AggregateMode(io.crate.expression.symbol.AggregateMode) DataTypes(io.crate.types.DataTypes) Matchers.is(org.hamcrest.Matchers.is) OnHeapMemoryManager(io.crate.memory.OnHeapMemoryManager) InputFactory(io.crate.expression.InputFactory) TestingRowConsumer(io.crate.testing.TestingRowConsumer) Mockito.mock(org.mockito.Mockito.mock) CoordinatorTxnCtx(io.crate.metadata.CoordinatorTxnCtx) ShardId(org.elasticsearch.index.shard.ShardId) InputFactory(io.crate.expression.InputFactory) OnHeapMemoryManager(io.crate.memory.OnHeapMemoryManager) ClusterSettings(org.elasticsearch.common.settings.ClusterSettings) LocalFsFileOutputFactory(io.crate.execution.engine.export.LocalFsFileOutputFactory) EvaluatingNormalizer(io.crate.expression.eval.EvaluatingNormalizer) NodeLimits(io.crate.execution.jobs.NodeLimits) NoneCircuitBreakerService(org.elasticsearch.indices.breaker.NoneCircuitBreakerService) Before(org.junit.Before)

Aggregations

RamAccounting (io.crate.breaker.RamAccounting)1 BatchIterator (io.crate.data.BatchIterator)1 InMemoryBatchIterator (io.crate.data.InMemoryBatchIterator)1 Row (io.crate.data.Row)1 RowConsumer (io.crate.data.RowConsumer)1 SENTINEL (io.crate.data.SentinelRow.SENTINEL)1 UnhandledServerException (io.crate.exceptions.UnhandledServerException)1 TransportActionProvider (io.crate.execution.TransportActionProvider)1 FilterProjection (io.crate.execution.dsl.projection.FilterProjection)1 GroupProjection (io.crate.execution.dsl.projection.GroupProjection)1 WriterProjection (io.crate.execution.dsl.projection.WriterProjection)1 LocalFsFileOutputFactory (io.crate.execution.engine.export.LocalFsFileOutputFactory)1 NodeLimits (io.crate.execution.jobs.NodeLimits)1 InputFactory (io.crate.expression.InputFactory)1 EvaluatingNormalizer (io.crate.expression.eval.EvaluatingNormalizer)1 EqOperator (io.crate.expression.operator.EqOperator)1 AggregateMode (io.crate.expression.symbol.AggregateMode)1 Function (io.crate.expression.symbol.Function)1 InputColumn (io.crate.expression.symbol.InputColumn)1 Literal (io.crate.expression.symbol.Literal)1