Class DefaultResourceManager
java.lang.Object
org.apache.drill.exec.work.foreman.rm.DefaultResourceManager
- All Implemented Interfaces:
ResourceManager
Represents a default resource manager for clusters that do not provide query
queues. Without queues to provide a hard limit on the query admission rate,
the number of active queries must be estimated and the resulting resource
allocations will be rough estimates.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
-
Constructor Summary
-
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.
-
Field Details
-
memoryPerNode
public final long memoryPerNode -
cpusPerNode
public final int cpusPerNode
-
-
Constructor Details
-
DefaultResourceManager
public DefaultResourceManager()
-
-
Method Details
-
memoryPerNode
public long memoryPerNode()Description copied from interface:ResourceManager
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.- Specified by:
memoryPerNode
in interfaceResourceManager
- Returns:
- the memory, in bytes, available in each Drillbit
-
cpusPerNode
public int cpusPerNode()- Specified by:
cpusPerNode
in interfaceResourceManager
-
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.- Specified by:
newResourceAllocator
in interfaceResourceManager
- Returns:
- a resource manager for the query
-
newQueryRM
Description copied from interface:ResourceManager
Create a resource manager to execute a query.- Specified by:
newQueryRM
in interfaceResourceManager
- Parameters:
foreman
- Foreman which manages the execution- Returns:
- a resource manager for the query
-
close
public void close()- Specified by:
close
in interfaceResourceManager
-