本文整理了Java中com.facebook.presto.memory.QueryContext.addTaskContext
方法的一些代码示例,展示了QueryContext.addTaskContext
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryContext.addTaskContext
方法的具体详情如下:
包路径:com.facebook.presto.memory.QueryContext
类名称:QueryContext
方法名:addTaskContext
暂无
代码示例来源:origin: prestodb/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: prestodb/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: prestodb/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: prestodb/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: uk.co.nichesolutions.presto/presto-main
public SqlTaskExecution create(Session session, QueryContext queryContext, TaskStateMachine taskStateMachine, SharedBuffer sharedBuffer, PlanFragment fragment, List<TaskSource> sources)
{
boolean verboseStats = getVerboseStats(session);
TaskContext taskContext = queryContext.addTaskContext(
taskStateMachine,
session,
requireNonNull(operatorPreAllocatedMemory, "operatorPreAllocatedMemory is null"),
verboseStats,
cpuTimerEnabled);
return createSqlTaskExecution(
taskStateMachine,
taskContext,
sharedBuffer,
fragment,
sources,
planner,
taskExecutor,
taskNotificationExecutor,
queryMonitor);
}
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
public static TaskContext createTaskContext(QueryContext queryContext, Executor executor, Session session, DataSize preallocated)
{
return queryContext.addTaskContext(
new TaskStateMachine(new TaskId("query", "stage", "task"), checkNotSameThreadExecutor(executor, "executor is null")),
session,
preallocated,
true,
true);
}
}
代码示例来源:origin: uk.co.nichesolutions.presto/presto-benchmark
.addTaskContext(new TaskStateMachine(new TaskId("query", "stage", "task"), executor),
session,
new DataSize(1, MEGABYTE),
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
public MockRemoteTask(TaskId taskId,
PlanFragment fragment,
String nodeId,
int partition,
Executor executor,
Multimap<PlanNodeId, Split> initialSplits,
PartitionedSplitCountTracker partitionedSplitCountTracker)
{
this.taskStateMachine = new TaskStateMachine(requireNonNull(taskId, "taskId is null"), requireNonNull(executor, "executor is null"));
MemoryPool memoryPool = new MemoryPool(new MemoryPoolId("test"), new DataSize(1, GIGABYTE));
MemoryPool memorySystemPool = new MemoryPool(new MemoryPoolId("testSystem"), new DataSize(1, GIGABYTE));
this.taskContext = new QueryContext(taskId.getQueryId(), new DataSize(1, MEGABYTE), memoryPool, memorySystemPool, executor).addTaskContext(taskStateMachine, TEST_SESSION, new DataSize(1, MEGABYTE), true, true);
this.location = URI.create("fake://task/" + taskId);
this.sharedBuffer = new SharedBuffer(taskId, TASK_INSTANCE_ID, executor, requireNonNull(new DataSize(1, BYTE), "maxBufferSize is null"));
this.fragment = requireNonNull(fragment, "fragment is null");
this.nodeId = requireNonNull(nodeId, "nodeId is null");
checkArgument(partition >= 0, "partition is negative");
this.partition = partition;
splits.putAll(initialSplits);
this.partitionedSplitCountTracker = requireNonNull(partitionedSplitCountTracker, "partitionedSplitCountTracker is null");
partitionedSplitCountTracker.setPartitionedSplitCount(getPartitionedSplitCount());
}
内容来源于网络,如有侵权,请联系作者删除!