com.facebook.presto.memory
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.facebook.presto.memory(Showing top 15 results out of 315)

origin: prestodb/presto

@Override
public R visitQueryContext(QueryContext queryContext, C visitContext)
{
  return mergeResults(queryContext.acceptChildren(this, visitContext));
}
origin: prestodb/presto

private static TaskContext createTaskContext(QueryContext queryContext, Session session, TaskStateMachine taskStateMachine)
{
  return queryContext.addTaskContext(
      taskStateMachine,
      session,
      true,
      true);
}
origin: prestodb/presto

private synchronized ListenableFuture<?> updateRevocableMemory(long delta)
{
  if (delta >= 0) {
    return memoryPool.reserveRevocable(queryId, delta);
  }
  memoryPool.freeRevocable(queryId, -delta);
  return NOT_BLOCKED;
}
origin: prestodb/presto

private boolean memoryRevokingNeeded(MemoryPool memoryPool)
{
  return memoryPool.getReservedRevocableBytes() > 0
      && memoryPool.getFreeBytes() <= memoryPool.getMaxBytes() * (1.0 - memoryRevokingThreshold);
}
origin: prestodb/presto

public synchronized void setResourceOvercommit()
{
  // Allow the query to use the entire pool. This way the worker will kill the query, if it uses the entire local general pool.
  // The coordinator will kill the query if the cluster runs out of memory.
  maxMemory = memoryPool.getMaxBytes();
}
origin: prestodb/presto

@Override
public VersionedMemoryPoolId getMemoryPool()
{
  return new VersionedMemoryPoolId(GENERAL_POOL, 0);
}
origin: prestodb/presto

private synchronized ListenableFuture<?> updateSystemMemory(long delta)
{
  if (delta >= 0) {
    return systemMemoryPool.reserve(queryId, delta);
  }
  systemMemoryPool.free(queryId, -delta);
  return NOT_BLOCKED;
}
origin: prestodb/presto

public <C, R> R accept(QueryContextVisitor<C, R> visitor, C context)
{
  return visitor.visitQueryContext(this, context);
}
origin: prestodb/presto

public <C, R> R accept(QueryContextVisitor<C, R> visitor, C context)
{
  return visitor.visitPipelineContext(this, context);
}
origin: prestodb/presto

public <C, R> R accept(QueryContextVisitor<C, R> visitor, C context)
{
  return visitor.visitTaskContext(this, context);
}
origin: prestodb/presto

public <C, R> R accept(QueryContextVisitor<C, R> visitor, C context)
{
  return visitor.visitOperatorContext(this, context);
}
origin: prestodb/presto

public <C, R> R accept(QueryContextVisitor<C, R> visitor, C context)
{
  return visitor.visitDriverContext(this, context);
}
origin: prestodb/presto

@Inject
public LocalMemoryManagerExporter(LocalMemoryManager memoryManager, MBeanExporter exporter)
{
  this.exporter = requireNonNull(exporter, "exporter is null");
  for (MemoryPool pool : memoryManager.getPools()) {
    addPool(pool);
  }
}
origin: prestodb/presto

@Override
public synchronized void updateMemoryPoolAssignments(MemoryPoolAssignmentsRequest assignments)
{
  if (coordinatorId != null && coordinatorId.equals(assignments.getCoordinatorId()) && assignments.getVersion() <= currentMemoryPoolAssignmentVersion) {
    return;
  }
  currentMemoryPoolAssignmentVersion = assignments.getVersion();
  if (coordinatorId != null && !coordinatorId.equals(assignments.getCoordinatorId())) {
    log.warn("Switching coordinator affinity from " + coordinatorId + " to " + assignments.getCoordinatorId());
  }
  coordinatorId = assignments.getCoordinatorId();
  for (MemoryPoolAssignment assignment : assignments.getAssignments()) {
    queryContexts.getUnchecked(assignment.getQueryId()).setMemoryPool(localMemoryManager.getPool(assignment.getPoolId()));
  }
}
origin: prestodb/presto

public TestSqlTaskManager()
{
  localMemoryManager = new LocalMemoryManager(new NodeMemoryConfig(), new ReservedSystemMemoryConfig());
  localSpillManager = new LocalSpillManager(new NodeSpillConfig());
  taskExecutor = new TaskExecutor(8, 16);
  taskExecutor.start();
  taskManagementExecutor = new TaskManagementExecutor();
}
com.facebook.presto.memory

Most used classes

  • AggregatedMemoryContext
  • MemoryPool
  • QueryContext
  • LocalMemoryContext
  • LocalMemoryManager
  • SimpleLocalMemoryContext,
  • ClusterMemoryManager,
  • ClusterMemoryPool,
  • LowMemoryKiller$QueryMemoryInfo,
  • MemoryInfo,
  • MemoryManagerConfig,
  • NodeMemoryConfig,
  • ReservedSystemMemoryConfig,
  • VersionedMemoryPoolId,
  • LocalMemoryManagerExporter,
  • LowMemoryKiller,
  • LowMemoryKillerTestingUtils$NodeReservation,
  • LowMemoryKillerTestingUtils$PoolReservation,
  • LowMemoryKillerTestingUtils

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)