Class DefaultResourceManager.DefaultQueryResourceManager
java.lang.Object
org.apache.drill.exec.work.foreman.rm.DefaultResourceManager.DefaultResourceAllocator
org.apache.drill.exec.work.foreman.rm.DefaultResourceManager.DefaultQueryResourceManager
- All Implemented Interfaces:
QueryResourceAllocator,QueryResourceManager
- Enclosing class:
DefaultResourceManager
public static class DefaultResourceManager.DefaultQueryResourceManager
extends DefaultResourceManager.DefaultResourceAllocator
implements QueryResourceManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadmit()Admit the query into the cluster.voidexit()Mark the query as completing, giving up its slot in the cluster.getParallelizer(boolean memoryPlanning) Create a parallelizer to parallelize each major fragment of the query into many minor fragments.booleanhasQueue()Hint that this resource manager queues.Returns the name of the queue (if any) on which the query was placed.voidsetCost(double cost) For some cases the foreman does not have a full plan, just a cost.Methods inherited from class org.apache.drill.exec.work.foreman.rm.DefaultResourceManager.DefaultResourceAllocator
getQueryContext, visitAbstractPlan, visitPhysicalPlanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.drill.exec.work.foreman.rm.QueryResourceAllocator
visitAbstractPlan, visitPhysicalPlan
-
Constructor Details
-
DefaultQueryResourceManager
-
-
Method Details
-
setCost
public void setCost(double cost) Description copied from interface:QueryResourceManagerFor some cases the foreman does not have a full plan, just a cost. In this case, this object will not plan memory, but still needs the cost to place the job into the correct queue.- Specified by:
setCostin interfaceQueryResourceManager- Parameters:
cost-
-
getParallelizer
Description copied from interface:QueryResourceManagerCreate a parallelizer to parallelize each major fragment of the query into many minor fragments. The parallelizer encapsulates the logic of how much memory and parallelism is required for the query.- Specified by:
getParallelizerin interfaceQueryResourceManager- Parameters:
memoryPlanning- memory planning needs to be done during parallelization- Returns:
-
admit
public void admit()Description copied from interface:QueryResourceManagerAdmit the query into the cluster. Blocks until the query can run. (Later revisions may use a more thread-friendly approach.)- Specified by:
admitin interfaceQueryResourceManager
-
exit
public void exit()Description copied from interface:QueryResourceManagerMark the query as completing, giving up its slot in the cluster. Releases any lease that may be held for a system with queues.- Specified by:
exitin interfaceQueryResourceManager
-
hasQueue
public boolean hasQueue()Description copied from interface:QueryResourceManagerHint that this resource manager queues. Allows the Foreman to short-circuit expensive logic if no queuing will actually be done. This is a static attribute per Drillbit run.- Specified by:
hasQueuein interfaceQueryResourceManager
-
queueName
Description copied from interface:QueryResourceManagerReturns the name of the queue (if any) on which the query was placed. Valid only after the query is admitted.- Specified by:
queueNamein interfaceQueryResourceManager- Returns:
- queue name, or null if queuing is not enabled.
-