public static class ThrottledResourceManager.QueuedQueryResourceManager extends ThrottledResourceManager.QueuedResourceAllocator implements QueryResourceManager
ThrottledResourceManager.QueuedResourceAllocator.BufferedOpFinder
plan, queryContext, queryCost, rm, work
Constructor and Description |
---|
QueuedQueryResourceManager(ThrottledResourceManager rm,
Foreman foreman) |
Modifier and Type | Method and Description |
---|---|
void |
admit()
Admit the query into the cluster.
|
void |
exit()
Mark the query as completing, giving up its slot in the
cluster.
|
QueryParallelizer |
getParallelizer(boolean planHasMemory)
Create a parallelizer to parallelize each major fragment of the query into
many minor fragments.
|
boolean |
hasQueue()
Hint that this resource manager queues.
|
protected long |
queryMemoryPerNode() |
String |
queueName()
Returns the name of the queue (if any) on which the query was
placed.
|
void |
setCost(double cost)
For some cases the foreman does not have a full plan, just a cost.
|
getQueryContext, visitAbstractPlan, visitPhysicalPlan
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitAbstractPlan, visitPhysicalPlan
public QueuedQueryResourceManager(ThrottledResourceManager rm, Foreman foreman)
public void setCost(double cost)
QueryResourceManager
setCost
in interface QueryResourceManager
public QueryParallelizer getParallelizer(boolean planHasMemory)
QueryResourceManager
getParallelizer
in interface QueryResourceManager
planHasMemory
- memory planning needs to be done during parallelizationpublic void admit() throws QueryQueue.QueueTimeoutException, QueryQueue.QueryQueueException
QueryResourceManager
admit
in interface QueryResourceManager
QueryQueue.QueueTimeoutException
- if the query timed out waiting to
be admitted.QueryQueue.QueryQueueException
- if something goes wrong with the
queue mechanismprotected long queryMemoryPerNode()
queryMemoryPerNode
in class ThrottledResourceManager.QueuedResourceAllocator
public void exit()
QueryResourceManager
exit
in interface QueryResourceManager
public boolean hasQueue()
QueryResourceManager
hasQueue
in interface QueryResourceManager
public String queueName()
QueryResourceManager
queueName
in interface QueryResourceManager
Copyright © 1970 The Apache Software Foundation. All rights reserved.