Interface ResourceManager
- All Known Implementing Classes:
AbstractResourceManager
,DefaultResourceManager
,DistributedResourceManager
,DynamicResourceManager
,ThrottledResourceManager
public interface ResourceManager
Drillbit-wide resource manager shared by all queries. Manages memory (at
present) and CPU (planned). Since queries are the primary consumer of
resources, manages resources by throttling queries into the system, and
allocating resources to queries in order to control total use. An "null"
implementation handles the case of no queuing. Clearly, the null case cannot
effectively control resource use.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
int
long
Returns the memory, in bytes, assigned to each node in a Drill cluster.newQueryRM
(Foreman foreman) Create a resource manager to execute a query.newResourceAllocator
(QueryContext queryContext) Create a resource manager to prepare or describe a query.
-
Method Details
-
memoryPerNode
long memoryPerNode()Returns the memory, in bytes, assigned to each node in a Drill cluster. Drill requires that nodes are symmetrical. So, knowing the memory on any one node also gives the memory on all other nodes.- Returns:
- the memory, in bytes, available in each Drillbit
-
cpusPerNode
int cpusPerNode() -
newResourceAllocator
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
Create a resource manager to execute a query.- Parameters:
foreman
- Foreman which manages the execution- Returns:
- a resource manager for the query
-
close
void close()
-