Package org.apache.drill.exec.resourcemgr.config.selectionpolicy


package org.apache.drill.exec.resourcemgr.config.selectionpolicy
Defines all the selection policy implementation which can be configured with Resource Management. The configuration which is used to specify a policy is ResourcePoolTreeImpl.ROOT_POOL_QUEUE_SELECTION_POLICY_KEY. Selection Policy helps to select a single leaf ResourcePool out of all the eligible pools whose queue can be used to admit this query. Currently there are 3 types of supported policies. In future more policies can be supported by implementing QueueSelectionPolicy interface.
  • DefaultQueueSelection: Out of all the eligible pools this policy will choose a default pool in the list. If there are multiple default pools present in the list then it will return the first default pool. If there is no default pool present then it throws QueueSelectionException
  • RandomQueueSelection: Out of all the eligible pools this policy will choose a pool at random. If there are no pools to select from then it throws QueueSelectionException
  • BestFitQueueSelection: Out of all the eligible pools this policy will choose a pool whose queue configuration QueryQueueConfigImpl.MAX_QUERY_MEMORY_PER_NODE_KEY value is closest to the max memory on a node required by the query. It tries to find a pool whose value for MAX_QUERY_MEMORY_PER_NODE is equal to queries max memory per node requirement. If there is no such pool then find the pool with config value just greater than queries max memory per node. Otherwise find a pool with config value just less than queries max memory per node.