io.prestosql.memory.QueryContext.addTaskContext()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(76)

本文整理了Java中io.prestosql.memory.QueryContext.addTaskContext方法的一些代码示例,展示了QueryContext.addTaskContext的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryContext.addTaskContext方法的具体详情如下:
包路径:io.prestosql.memory.QueryContext
类名称:QueryContext
方法名:addTaskContext

QueryContext.addTaskContext介绍

暂无

代码示例

代码示例来源:origin: io.prestosql/presto-main

private static TaskContext createTaskContext(QueryContext queryContext, Session session, TaskStateMachine taskStateMachine)
{
  return queryContext.addTaskContext(
      taskStateMachine,
      session,
      true,
      true,
      OptionalInt.empty());
}

代码示例来源:origin: io.prestosql/presto-main

private TaskInfo createTask(SqlTaskManager sqlTaskManager, TaskId taskId, OutputBuffers outputBuffers)
{
  sqlTaskManager.getQueryContext(taskId.getQueryId())
      .addTaskContext(new TaskStateMachine(taskId, directExecutor()), testSessionBuilder().build(), false, false, OptionalInt.empty());
  return sqlTaskManager.updateTask(TEST_SESSION,
      taskId,
      Optional.of(PLAN_FRAGMENT),
      ImmutableList.of(),
      outputBuffers,
      OptionalInt.empty());
}

代码示例来源:origin: prestosql/presto

private TaskInfo createTask(SqlTaskManager sqlTaskManager, TaskId taskId, OutputBuffers outputBuffers)
{
  sqlTaskManager.getQueryContext(taskId.getQueryId())
      .addTaskContext(new TaskStateMachine(taskId, directExecutor()), testSessionBuilder().build(), false, false, OptionalInt.empty());
  return sqlTaskManager.updateTask(TEST_SESSION,
      taskId,
      Optional.of(PLAN_FRAGMENT),
      ImmutableList.of(),
      outputBuffers,
      OptionalInt.empty());
}

代码示例来源:origin: prestosql/presto

public SqlTaskExecution create(Session session, QueryContext queryContext, TaskStateMachine taskStateMachine, OutputBuffer outputBuffer, PlanFragment fragment, List<TaskSource> sources, OptionalInt totalPartitions)
  TaskContext taskContext = queryContext.addTaskContext(
      taskStateMachine,
      session,

代码示例来源:origin: io.prestosql/presto-main

public SqlTaskExecution create(Session session, QueryContext queryContext, TaskStateMachine taskStateMachine, OutputBuffer outputBuffer, PlanFragment fragment, List<TaskSource> sources, OptionalInt totalPartitions)
  TaskContext taskContext = queryContext.addTaskContext(
      taskStateMachine,
      session,

代码示例来源:origin: io.prestosql/presto-benchmark

new DataSize(256, MEGABYTE),
spillSpaceTracker)
.addTaskContext(new TaskStateMachine(new TaskId("query", 0, 0), localQueryRunner.getExecutor()),
    session,
    false,

代码示例来源:origin: io.prestosql/presto-main

private OperatorContext createContexts(SqlTask sqlTask)
{
  TaskContext taskContext = sqlTask.getQueryContext().addTaskContext(new TaskStateMachine(new TaskId("q", 1, 1), executor), session, false, false, OptionalInt.empty());
  PipelineContext pipelineContext = taskContext.addPipelineContext(0, false, false, false);
  DriverContext driverContext = pipelineContext.addDriverContext();
  OperatorContext operatorContext = driverContext.addOperatorContext(1, new PlanNodeId("na"), "na");
  return operatorContext;
}

代码示例来源:origin: prestosql/presto

private OperatorContext createContexts(SqlTask sqlTask)
{
  TaskContext taskContext = sqlTask.getQueryContext().addTaskContext(new TaskStateMachine(new TaskId("q", 1, 1), executor), session, false, false, OptionalInt.empty());
  PipelineContext pipelineContext = taskContext.addPipelineContext(0, false, false, false);
  DriverContext driverContext = pipelineContext.addDriverContext();
  OperatorContext operatorContext = driverContext.addOperatorContext(1, new PlanNodeId("na"), "na");
  return operatorContext;
}

代码示例来源:origin: io.prestosql/presto-main

new DataSize(1, MEGABYTE),
    spillSpaceTracker);
this.taskContext = queryContext.addTaskContext(taskStateMachine, TEST_SESSION, true, true, totalPartitions);

代码示例来源:origin: io.prestosql/presto-main

@BeforeMethod
public void setUpTest()
{
  memoryPool = new MemoryPool(new MemoryPoolId("test"), memoryPoolSize);
  queryContext = new QueryContext(
      new QueryId("test_query"),
      queryMaxMemory,
      queryMaxTotalMemory,
      memoryPool,
      new TestingGcMonitor(),
      notificationExecutor,
      yieldExecutor,
      queryMaxSpillSize,
      spillSpaceTracker);
  taskContext = queryContext.addTaskContext(
      new TaskStateMachine(new TaskId("query", 0, 0), notificationExecutor),
      testSessionBuilder().build(),
      true,
      true,
      OptionalInt.empty());
  pipelineContext = taskContext.addPipelineContext(0, true, true, false);
  driverContext = pipelineContext.addDriverContext();
  operatorContext = driverContext.addOperatorContext(1, new PlanNodeId("a"), "test-operator");
}

代码示例来源:origin: io.prestosql/presto-main

SqlTask sqlTask2 = newSqlTask();
TaskContext taskContext1 = sqlTask1.getQueryContext().addTaskContext(new TaskStateMachine(new TaskId("q1", 1, 1), executor), session, false, false, OptionalInt.empty());
PipelineContext pipelineContext11 = taskContext1.addPipelineContext(0, false, false, false);
DriverContext driverContext111 = pipelineContext11.addDriverContext();
OperatorContext operatorContext3 = driverContext112.addOperatorContext(3, new PlanNodeId("na"), "na");
TaskContext taskContext2 = sqlTask2.getQueryContext().addTaskContext(new TaskStateMachine(new TaskId("q2", 1, 1), executor), session, false, false, OptionalInt.empty());
PipelineContext pipelineContext21 = taskContext2.addPipelineContext(1, false, false, false);
DriverContext driverContext211 = pipelineContext21.addDriverContext();

代码示例来源:origin: io.prestosql/presto-main

private TaskContext newTestingTaskContext(ScheduledExecutorService taskNotificationExecutor, ScheduledExecutorService driverYieldExecutor, TaskStateMachine taskStateMachine)
{
  QueryContext queryContext = new QueryContext(
      new QueryId("queryid"),
      new DataSize(1, MEGABYTE),
      new DataSize(2, MEGABYTE),
      new MemoryPool(new MemoryPoolId("test"), new DataSize(1, GIGABYTE)),
      new TestingGcMonitor(),
      taskNotificationExecutor,
      driverYieldExecutor,
      new DataSize(1, MEGABYTE),
      new SpillSpaceTracker(new DataSize(1, GIGABYTE)));
  return queryContext.addTaskContext(taskStateMachine, TEST_SESSION, false, false, OptionalInt.empty());
}

代码示例来源:origin: prestosql/presto

SqlTask sqlTask2 = newSqlTask();
TaskContext taskContext1 = sqlTask1.getQueryContext().addTaskContext(new TaskStateMachine(new TaskId("q1", 1, 1), executor), session, false, false, OptionalInt.empty());
PipelineContext pipelineContext11 = taskContext1.addPipelineContext(0, false, false, false);
DriverContext driverContext111 = pipelineContext11.addDriverContext();
OperatorContext operatorContext3 = driverContext112.addOperatorContext(3, new PlanNodeId("na"), "na");
TaskContext taskContext2 = sqlTask2.getQueryContext().addTaskContext(new TaskStateMachine(new TaskId("q2", 1, 1), executor), session, false, false, OptionalInt.empty());
PipelineContext pipelineContext21 = taskContext2.addPipelineContext(1, false, false, false);
DriverContext driverContext211 = pipelineContext21.addDriverContext();

代码示例来源:origin: io.prestosql/presto-main

public SqlTask createInitialTask()
  {
    TaskId taskId = new TaskId("query", 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 MemoryPool(new MemoryPoolId("test"), new DataSize(1, GIGABYTE)),
        new TestingGcMonitor(),
        taskNotificationExecutor,
        driverYieldExecutor,
        new DataSize(1, MEGABYTE),
        new SpillSpaceTracker(new DataSize(1, GIGABYTE)));

    queryContext.addTaskContext(new TaskStateMachine(taskId, taskNotificationExecutor), testSessionBuilder().build(), false, false, OptionalInt.empty());

    return createSqlTask(
        taskId,
        location,
        "fake",
        queryContext,
        sqlTaskExecutionFactory,
        taskNotificationExecutor,
        Functions.identity(),
        new DataSize(32, MEGABYTE),
        new CounterStat());
  }
}

代码示例来源:origin: io.prestosql/presto-benchmark

.addTaskContext(new TaskStateMachine(new TaskId("query", 0, 0), localQueryRunner.getExecutor()),
    localQueryRunner.getDefaultSession(),
    false,

相关文章

微信公众号

最新文章

更多