Class ResourcePoolImpl
java.lang.Object
org.apache.drill.exec.resourcemgr.config.ResourcePoolImpl
- All Implemented Interfaces:
ResourcePool
Parses and initializes all the provided configuration for a ResourcePool defined in RM configuration. It takes
care of creating all the child ResourcePools belonging to this Resource Pool,
ResourcePoolSelector for this
pool and a QueryQueueConfig if it's a leaf pool.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns full path in terms of concatenated pool names from root pool to this pool inResourcePoolTreelonglonggetPoolMemoryInMB(int numClusterNodes) Total memory share in MB assigned to this ResourcePooldoubleActual percentage share of memory assigned to this ResourcePoolIf this a leaf pool then returns theQueryQueueConfigfor the queue associated with this poolbooleanDetermines if this ResourcePool is a default pool or not which will act as a sink for all the queriesbooleanDetermines if this ResourcePool is a leaf pool or not which will have a queue associated with ittoString()voidvisitAndSelectPool(QueueAssignmentResult assignmentResult, QueryContext queryContext) Used to determine if a ResourcePool is selected for a given query or not.
-
Field Details
-
POOL_NAME_KEY
- See Also:
-
POOL_MEMORY_SHARE_KEY
- See Also:
-
POOL_CHILDREN_POOLS_KEY
- See Also:
-
POOL_SELECTOR_KEY
- See Also:
-
POOL_QUEUE_KEY
- See Also:
-
-
Method Details
-
getPoolName
- Specified by:
getPoolNamein interfaceResourcePool
-
isLeafPool
public boolean isLeafPool()Determines if this ResourcePool is a leaf pool or not which will have a queue associated with it- Specified by:
isLeafPoolin interfaceResourcePool- Returns:
- true If a leaf pool, false otherwise
-
isDefaultPool
public boolean isDefaultPool()Determines if this ResourcePool is a default pool or not which will act as a sink for all the queries- Specified by:
isDefaultPoolin interfaceResourcePool- Returns:
- true If a Default pool, false otherwise
-
getMaxQueryMemoryPerNode
public long getMaxQueryMemoryPerNode()- Specified by:
getMaxQueryMemoryPerNodein interfaceResourcePool
-
visitAndSelectPool
Used to determine if a ResourcePool is selected for a given query or not. It uses the assigned selector of this ResourcePool which takes in query metadata to determine if a query is allowed in this pool.- Specified by:
visitAndSelectPoolin interfaceResourcePool- Parameters:
assignmentResult- Used to keep track of all selected leaf pools and all rejected pools for given queryqueryContext- Contains query metadata like user, groups, tags, etc used by ResourcePoolSelector
-
getPoolMemoryInMB
public long getPoolMemoryInMB(int numClusterNodes) Total memory share in MB assigned to this ResourcePool- Specified by:
getPoolMemoryInMBin interfaceResourcePool- Parameters:
numClusterNodes- number of available cluster nodes for this pool- Returns:
- Pool memory share in MB
-
getQueryQueue
If this a leaf pool then returns theQueryQueueConfigfor the queue associated with this pool- Specified by:
getQueryQueuein interfaceResourcePool- Returns:
QueryQueueConfigobject for this pool
-
getParentPool
- Specified by:
getParentPoolin interfaceResourcePool
-
getFullPath
Returns full path in terms of concatenated pool names from root pool to this pool inResourcePoolTree- Specified by:
getFullPathin interfaceResourcePool- Returns:
- String with pool names from root to this pool
-
getChildPools
- Specified by:
getChildPoolsin interfaceResourcePool
-
getSelector
- Specified by:
getSelectorin interfaceResourcePool
-
toString
-