public class BestFitQueueSelection extends AbstractQueueSelectionPolicy
QueryQueueConfig.getMaxQueryMemoryInMBPerNode() is nearest to the max memory
on a node required by the given query. Nearest is found by following rule:
QueryQueueConfigImpl.MAX_QUERY_MEMORY_PER_NODE_KEY is
equal to max memory per node of given query
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.
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.
QueueSelectionPolicy.SelectionPolicy| Constructor and Description |
|---|
BestFitQueueSelection() |
| Modifier and Type | Method and Description |
|---|---|
ResourcePool |
selectQueue(List<ResourcePool> allPools,
QueryContext queryContext,
NodeResources maxResourcePerNode) |
getSelectionPolicypublic ResourcePool selectQueue(List<ResourcePool> allPools, QueryContext queryContext, NodeResources maxResourcePerNode) throws QueueSelectionException
selectQueue in interface QueueSelectionPolicyselectQueue in class AbstractQueueSelectionPolicyQueueSelectionExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.