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 Details

  • Method Details

    • setCost

      public void setCost(double cost)
      Description copied from interface: QueryResourceManager
      For 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:
      setCost in interface QueryResourceManager
    • getParallelizer

      public QueryParallelizer getParallelizer(boolean memoryPlanning)
      Description copied from interface: QueryResourceManager
      Create 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:
      getParallelizer in interface QueryResourceManager
      Parameters:
      memoryPlanning - memory planning needs to be done during parallelization
      Returns:
    • admit

      public void admit()
      Description copied from interface: QueryResourceManager
      Admit the query into the cluster. Blocks until the query can run. (Later revisions may use a more thread-friendly approach.)
      Specified by:
      admit in interface QueryResourceManager
    • exit

      public void exit()
      Description copied from interface: QueryResourceManager
      Mark 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:
      exit in interface QueryResourceManager
    • hasQueue

      public boolean hasQueue()
      Description copied from interface: QueryResourceManager
      Hint 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:
      hasQueue in interface QueryResourceManager
    • queueName

      public String queueName()
      Description copied from interface: QueryResourceManager
      Returns the name of the queue (if any) on which the query was placed. Valid only after the query is admitted.
      Specified by:
      queueName in interface QueryResourceManager
      Returns:
      queue name, or null if queuing is not enabled.