public class ResourcePoolImpl extends Object implements ResourcePool
ResourcePoolSelector
for this
pool and a QueryQueueConfig
if it's a leaf pool.Modifier and Type | Field and Description |
---|---|
static String |
POOL_CHILDREN_POOLS_KEY |
static String |
POOL_MEMORY_SHARE_KEY |
static String |
POOL_NAME_KEY |
static String |
POOL_QUEUE_KEY |
static String |
POOL_SELECTOR_KEY |
Modifier and Type | Method and Description |
---|---|
List<ResourcePool> |
getChildPools() |
String |
getFullPath()
Returns full path in terms of concatenated pool names from root pool to this pool in
ResourcePoolTree |
long |
getMaxQueryMemoryPerNode() |
ResourcePool |
getParentPool() |
long |
getPoolMemoryInMB(int numClusterNodes)
Total memory share in MB assigned to this ResourcePool
|
double |
getPoolMemoryShare()
Actual percentage share of memory assigned to this ResourcePool
|
String |
getPoolName() |
QueryQueueConfig |
getQueryQueue()
If this a leaf pool then returns the
QueryQueueConfig for the queue associated with this pool |
ResourcePoolSelector |
getSelector() |
boolean |
isDefaultPool()
Determines if this ResourcePool is a default pool or not which will act as a sink for all the queries
|
boolean |
isLeafPool()
Determines if this ResourcePool is a leaf pool or not which will have a queue associated with it
|
String |
toString() |
void |
visitAndSelectPool(QueueAssignmentResult assignmentResult,
QueryContext queryContext)
Used to determine if a ResourcePool is selected for a given query or not.
|
public static final String POOL_NAME_KEY
public static final String POOL_MEMORY_SHARE_KEY
public static final String POOL_CHILDREN_POOLS_KEY
public static final String POOL_SELECTOR_KEY
public static final String POOL_QUEUE_KEY
public String getPoolName()
getPoolName
in interface ResourcePool
public boolean isLeafPool()
isLeafPool
in interface ResourcePool
public boolean isDefaultPool()
isDefaultPool
in interface ResourcePool
public long getMaxQueryMemoryPerNode()
getMaxQueryMemoryPerNode
in interface ResourcePool
public void visitAndSelectPool(QueueAssignmentResult assignmentResult, QueryContext queryContext)
visitAndSelectPool
in interface ResourcePool
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 ResourcePoolSelectorpublic double getPoolMemoryShare()
getPoolMemoryShare
in interface ResourcePool
public long getPoolMemoryInMB(int numClusterNodes)
getPoolMemoryInMB
in interface ResourcePool
numClusterNodes
- number of available cluster nodes for this poolpublic QueryQueueConfig getQueryQueue()
QueryQueueConfig
for the queue associated with this poolgetQueryQueue
in interface ResourcePool
QueryQueueConfig
object for this poolpublic ResourcePool getParentPool()
getParentPool
in interface ResourcePool
public String getFullPath()
ResourcePoolTree
getFullPath
in interface ResourcePool
public List<ResourcePool> getChildPools()
getChildPools
in interface ResourcePool
public ResourcePoolSelector getSelector()
getSelector
in interface ResourcePool
Copyright © 1970 The Apache Software Foundation. All rights reserved.