Class ThrottledResourceManager
java.lang.Object
org.apache.drill.exec.work.foreman.rm.AbstractResourceManager
org.apache.drill.exec.work.foreman.rm.ThrottledResourceManager
- All Implemented Interfaces:
ResourceManager
Global resource manager that provides basic admission control (AC) via a
configured queue: either the Zookeeper-based distributed queue or the
in-process embedded Drillbit queue. The queue places an upper limit on the
number of running queries. This limit then "slices" memory and CPU between
queries: each gets the same share of resources.
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Per-query resource manager.static class
-
Field Summary
Fields inherited from class org.apache.drill.exec.work.foreman.rm.AbstractResourceManager
context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
defaultQueryMemoryPerNode
(double cost) long
newQueryRM
(Foreman foreman) Create a resource manager to execute a query.newResourceAllocator
(QueryContext queryContext) Create a resource manager to prepare or describe a query.queue()
Methods inherited from class org.apache.drill.exec.work.foreman.rm.AbstractResourceManager
cpusPerNode, memoryPerNode
-
Constructor Details
-
ThrottledResourceManager
-
-
Method Details
-
minimumOperatorMemory
public long minimumOperatorMemory() -
defaultQueryMemoryPerNode
public long defaultQueryMemoryPerNode(double cost) -
queue
-
newResourceAllocator
Description copied from interface:ResourceManager
Create a resource manager to prepare or describe a query. In this form, no queuing is done, but the plan is created as if queuing had been done. Used when executing EXPLAIN PLAN.- Returns:
- a resource manager for the query
-
newQueryRM
Description copied from interface:ResourceManager
Create a resource manager to execute a query.- Parameters:
foreman
- Foreman which manages the execution- Returns:
- a resource manager for the query
-
close
public void close()
-