public class ThrottledResourceManager extends AbstractResourceManager
This is a "basic" implementation. Clearly, a more advanced implementation could look at query cost to determine whether to give a given query more or less than the "standard" share. That is left as a future exercise; in this version we just want to get the basics working.
This is the resource manager level. This resource manager is paired with a queue implementation to produce a complete solution. This composition-based approach allows sharing of functionality across queue implementations.
| Modifier and Type | Class and Description |
|---|---|
static class |
ThrottledResourceManager.QueuedQueryResourceManager
Per-query resource manager.
|
static class |
ThrottledResourceManager.QueuedResourceAllocator |
context| Constructor and Description |
|---|
ThrottledResourceManager(DrillbitContext drillbitContext,
QueryQueue queue) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
defaultQueryMemoryPerNode(double cost) |
long |
minimumOperatorMemory() |
QueryResourceManager |
newQueryRM(Foreman foreman)
Create a resource manager to execute a query.
|
QueryResourceAllocator |
newResourceAllocator(QueryContext queryContext)
Create a resource manager to prepare or describe a query.
|
QueryQueue |
queue() |
cpusPerNode, memoryPerNodepublic ThrottledResourceManager(DrillbitContext drillbitContext, QueryQueue queue)
public long minimumOperatorMemory()
public long defaultQueryMemoryPerNode(double cost)
public QueryQueue queue()
public QueryResourceAllocator newResourceAllocator(QueryContext queryContext)
ResourceManagerpublic QueryResourceManager newQueryRM(Foreman foreman)
ResourceManagerforeman - Foreman which manages the executionpublic void close()
Copyright © 2021 The Apache Software Foundation. All rights reserved.