Interface ResourceManager

All Known Implementing Classes:
AbstractResourceManager, DefaultResourceManager, DistributedResourceManager, DynamicResourceManager, ThrottledResourceManager

public interface ResourceManager
Drillbit-wide resource manager shared by all queries. Manages memory (at present) and CPU (planned). Since queries are the primary consumer of resources, manages resources by throttling queries into the system, and allocating resources to queries in order to control total use. An "null" implementation handles the case of no queuing. Clearly, the null case cannot effectively control resource use.
  • Method Details

    • memoryPerNode

      long memoryPerNode()
      Returns the memory, in bytes, assigned to each node in a Drill cluster. Drill requires that nodes are symmetrical. So, knowing the memory on any one node also gives the memory on all other nodes.
      the memory, in bytes, available in each Drillbit
    • cpusPerNode

      int cpusPerNode()
    • newResourceAllocator

      QueryResourceAllocator newResourceAllocator(QueryContext queryContext)
      Create a resource manager to prepare or describe a query. In this form, no queuing is done, but the plan is created as if queuing had been done. Used when executing EXPLAIN PLAN.
      a resource manager for the query
    • newQueryRM

      QueryResourceManager newQueryRM(Foreman foreman)
      Create a resource manager to execute a query.
      foreman - Foreman which manages the execution
      a resource manager for the query
    • close

      void close()