com.facebook.presto.memory.QueryContext.<init>()方法的使用及代码示例

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

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

QueryContext.<init>介绍

暂无

代码示例

代码示例来源:origin: uk.co.nichesolutions.presto/presto-main

@Override
  public QueryContext load(QueryId key)
      throws Exception
  {
    return new QueryContext(key, maxQueryMemoryPerNode, localMemoryManager.getPool(LocalMemoryManager.GENERAL_POOL), localMemoryManager.getPool(LocalMemoryManager.SYSTEM_POOL), taskNotificationExecutor);
  }
});

代码示例来源:origin: uk.co.nichesolutions.presto/presto-benchmark

MemoryPool systemMemoryPool = new MemoryPool(new MemoryPoolId("testSystem"), new DataSize(1, GIGABYTE));
TaskContext taskContext = new QueryContext(new QueryId("test"), new DataSize(256, MEGABYTE), memoryPool, systemMemoryPool, executor)
    .addTaskContext(new TaskStateMachine(new TaskId("query", "stage", "task"), executor),
        session,

代码示例来源:origin: uk.co.nichesolutions.presto/presto-main

public static TaskContext createTaskContext(Executor executor, Session session, DataSize maxMemory, DataSize preallocated)
{
  MemoryPool memoryPool = new MemoryPool(new MemoryPoolId("test"), new DataSize(1, GIGABYTE));
  MemoryPool systemMemoryPool = new MemoryPool(new MemoryPoolId("testSystem"), new DataSize(1, GIGABYTE));
  QueryContext queryContext = new QueryContext(new QueryId("test_query"), maxMemory, memoryPool, systemMemoryPool, executor);
  return createTaskContext(queryContext, executor, session, preallocated);
}

代码示例来源: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());
}

代码示例来源:origin: uk.co.nichesolutions.presto/presto-main

public SqlTask createInitialTask()
  {
    TaskId taskId = new TaskId("query", "stage", "task" + nextTaskId.incrementAndGet());
    URI location = URI.create("fake://task/" + taskId);

    return new SqlTask(
        taskId,
        location,
        new QueryContext(new QueryId("query"), new DataSize(1, MEGABYTE), new MemoryPool(new MemoryPoolId("test"), new DataSize(1, GIGABYTE)), new MemoryPool(new MemoryPoolId("testSystem"), new DataSize(1, GIGABYTE)), taskNotificationExecutor),
        sqlTaskExecutionFactory,
        taskNotificationExecutor,
        Functions.<SqlTask>identity(),
        new DataSize(32, MEGABYTE));
  }
}

代码示例来源:origin: uk.co.nichesolutions.presto/presto-main

MemoryPool systemPool = new MemoryPool(new MemoryPoolId("testSystem"), new DataSize(10, MEGABYTE));
QueryContext queryContext = new QueryContext(new QueryId("query"), new DataSize(10, MEGABYTE), pool, systemPool, localQueryRunner.getExecutor());
LocalQueryRunner.MaterializedOutputFactory outputFactory = new LocalQueryRunner.MaterializedOutputFactory();
TaskContext taskContext = createTaskContext(queryContext, localQueryRunner.getExecutor(), session, new DataSize(0, BYTE));

相关文章

微信公众号

最新文章

更多