Class DynamicResourceManager
java.lang.Object
org.apache.drill.exec.work.foreman.rm.DynamicResourceManager
- All Implemented Interfaces:
ResourceManager
Wrapper around the default and/or distributed resource managers
to allow dynamically enabling and disabling queueing.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactiveRM()voidclose()intlongReturns 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
-
nextUpdateTime
public long nextUpdateTime -
recheckDelayMs
public final int recheckDelayMs- See Also:
-
-
Constructor Details
-
DynamicResourceManager
-
-
Method Details
-
activeRM
-
memoryPerNode
public long memoryPerNode()Description copied from interface:ResourceManagerReturns 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:
memoryPerNodein interfaceResourceManager- Returns:
- the memory, in bytes, available in each Drillbit
-
cpusPerNode
public int cpusPerNode()- Specified by:
cpusPerNodein interfaceResourceManager
-
newResourceAllocator
Description copied from interface:ResourceManagerCreate 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:
newResourceAllocatorin interfaceResourceManager- Returns:
- a resource manager for the query
-
newQueryRM
Description copied from interface:ResourceManagerCreate a resource manager to execute a query.- Specified by:
newQueryRMin interfaceResourceManager- Parameters:
foreman- Foreman which manages the execution- Returns:
- a resource manager for the query
-
close
public void close()- Specified by:
closein interfaceResourceManager
-