Search in sources :

Example 1 with SpoolingOutputBufferFactory

use of com.facebook.presto.execution.buffer.SpoolingOutputBufferFactory in project presto by prestodb.

the class TestSqlTask method createInitialTask.

public SqlTask createInitialTask() {
    TaskId taskId = new TaskId("query", 0, 0, nextTaskId.incrementAndGet());
    URI location = URI.create("fake://task/" + taskId);
    QueryContext queryContext = new QueryContext(new QueryId("query"), new DataSize(1, MEGABYTE), new DataSize(2, MEGABYTE), new DataSize(1, MEGABYTE), new DataSize(1, GIGABYTE), new MemoryPool(new MemoryPoolId("test"), new DataSize(1, GIGABYTE)), new TestingGcMonitor(), taskNotificationExecutor, driverYieldExecutor, new DataSize(1, MEGABYTE), new SpillSpaceTracker(new DataSize(1, GIGABYTE)), listJsonCodec(TaskMemoryReservationSummary.class));
    queryContext.addTaskContext(new TaskStateMachine(taskId, taskNotificationExecutor), testSessionBuilder().build(), Optional.of(PLAN_FRAGMENT.getRoot()), false, false, false, false, false);
    return createSqlTask(taskId, location, "fake", queryContext, sqlTaskExecutionFactory, new MockExchangeClientSupplier(), taskNotificationExecutor, Functions.identity(), new DataSize(32, MEGABYTE), new CounterStat(), new SpoolingOutputBufferFactory(new FeaturesConfig()));
}
Also used : TaskMemoryReservationSummary(com.facebook.presto.operator.TaskMemoryReservationSummary) SpillSpaceTracker(com.facebook.presto.spiller.SpillSpaceTracker) MockExchangeClientSupplier(com.facebook.presto.execution.TestSqlTaskManager.MockExchangeClientSupplier) CounterStat(com.facebook.airlift.stats.CounterStat) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) QueryId(com.facebook.presto.spi.QueryId) QueryContext(com.facebook.presto.memory.QueryContext) URI(java.net.URI) DataSize(io.airlift.units.DataSize) TestingGcMonitor(com.facebook.airlift.stats.TestingGcMonitor) SpoolingOutputBufferFactory(com.facebook.presto.execution.buffer.SpoolingOutputBufferFactory) MemoryPoolId(com.facebook.presto.spi.memory.MemoryPoolId) MemoryPool(com.facebook.presto.memory.MemoryPool)

Example 2 with SpoolingOutputBufferFactory

use of com.facebook.presto.execution.buffer.SpoolingOutputBufferFactory in project presto by prestodb.

the class TestMemoryRevokingScheduler method newSqlTask.

private SqlTask newSqlTask(QueryId queryId, MemoryPool memoryPool) {
    QueryContext queryContext = getOrCreateQueryContext(queryId, memoryPool);
    TaskId taskId = new TaskId(queryId.getId(), 0, 0, idGeneator.incrementAndGet());
    URI location = URI.create("fake://task/" + taskId);
    return createSqlTask(taskId, location, "fake", queryContext, sqlTaskExecutionFactory, new MockExchangeClientSupplier(), singleThreadedExecutor, Functions.identity(), new DataSize(32, MEGABYTE), new CounterStat(), new SpoolingOutputBufferFactory(new FeaturesConfig()));
}
Also used : MockExchangeClientSupplier(com.facebook.presto.execution.TestSqlTaskManager.MockExchangeClientSupplier) CounterStat(com.facebook.airlift.stats.CounterStat) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) DataSize(io.airlift.units.DataSize) QueryContext(com.facebook.presto.memory.QueryContext) SpoolingOutputBufferFactory(com.facebook.presto.execution.buffer.SpoolingOutputBufferFactory) URI(java.net.URI)

Aggregations

CounterStat (com.facebook.airlift.stats.CounterStat)2 MockExchangeClientSupplier (com.facebook.presto.execution.TestSqlTaskManager.MockExchangeClientSupplier)2 SpoolingOutputBufferFactory (com.facebook.presto.execution.buffer.SpoolingOutputBufferFactory)2 QueryContext (com.facebook.presto.memory.QueryContext)2 FeaturesConfig (com.facebook.presto.sql.analyzer.FeaturesConfig)2 DataSize (io.airlift.units.DataSize)2 URI (java.net.URI)2 TestingGcMonitor (com.facebook.airlift.stats.TestingGcMonitor)1 MemoryPool (com.facebook.presto.memory.MemoryPool)1 TaskMemoryReservationSummary (com.facebook.presto.operator.TaskMemoryReservationSummary)1 QueryId (com.facebook.presto.spi.QueryId)1 MemoryPoolId (com.facebook.presto.spi.memory.MemoryPoolId)1 SpillSpaceTracker (com.facebook.presto.spiller.SpillSpaceTracker)1