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

public class BestFitQueueSelection extends AbstractQueueSelectionPolicy
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_KEY is equal to max memory per node of given query
  • Queue whose QueryQueueConfigImpl.MAX_QUERY_MEMORY_PER_NODE_KEY is 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_KEY is 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.