use of com.facebook.presto.memory.MemoryPoolAssignment in project presto by prestodb.
the class SqlTaskManager method updateMemoryPoolAssignments.
@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()));
}
}
Aggregations