Class BestFitQueueSelection
java.lang.Object
org.apache.drill.exec.resourcemgr.config.selectionpolicy.AbstractQueueSelectionPolicy
org.apache.drill.exec.resourcemgr.config.selectionpolicy.BestFitQueueSelection
- All Implemented Interfaces:
QueueSelectionPolicy
Helps to select a queue whose
QueryQueueConfig.getMaxQueryMemoryInMBPerNode() is nearest to the max memory
on a node required by the given query. Nearest is found by following rule:
-
Queue whose
QueryQueueConfigImpl.MAX_QUERY_MEMORY_PER_NODE_KEYis equal to max memory per node of given query -
Queue whose
QueryQueueConfigImpl.MAX_QUERY_MEMORY_PER_NODE_KEYis just greater than max memory per node of given query. From all queues whose max_query_memory_per_node is greater than what is needed by the query, the queue with minimum value is chosen. -
Queue whose
QueryQueueConfigImpl.MAX_QUERY_MEMORY_PER_NODE_KEYis just less than max memory per node of given query. From all queues whose max_query_memory_per_node is less than what is needed by the query, the queue with maximum value is chosen.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.exec.resourcemgr.config.selectionpolicy.QueueSelectionPolicy
QueueSelectionPolicy.SelectionPolicy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionselectQueue(List<ResourcePool> allPools, QueryContext queryContext, NodeResources maxResourcePerNode) Methods inherited from class org.apache.drill.exec.resourcemgr.config.selectionpolicy.AbstractQueueSelectionPolicy
getSelectionPolicy
-
Constructor Details
-
BestFitQueueSelection
public BestFitQueueSelection()
-
-
Method Details
-
selectQueue
public ResourcePool selectQueue(List<ResourcePool> allPools, QueryContext queryContext, NodeResources maxResourcePerNode) throws QueueSelectionException - Specified by:
selectQueuein interfaceQueueSelectionPolicy- Specified by:
selectQueuein classAbstractQueueSelectionPolicy- Throws:
QueueSelectionException
-