Class WorkManager.WorkerBee

java.lang.Object
org.apache.drill.exec.work.WorkManager.WorkerBee
Enclosing class:
WorkManager

public class WorkManager.WorkerBee extends Object
Narrowed interface to WorkManager that is made available to tasks it is managing.
  • Constructor Details

    • WorkerBee

      public WorkerBee()
  • Method Details

    • addNewForeman

      public void addNewForeman(Foreman foreman)
    • addNewWork

      public void addNewWork(Runnable runnable)
      Add a self contained runnable work to executor service.
      Parameters:
      runnable - runnable to execute
    • cancelForeman

      public boolean cancelForeman(UserBitShared.QueryId queryId, DrillUserPrincipal principal)
    • retireForeman

      public void retireForeman(Foreman foreman)
      Remove the given Foreman from the running query list.

      The running query list is a bit of a misnomer, because it doesn't necessarily mean that Foreman.run() is executing. That only lasts for the duration of query setup, after which the Foreman instance survives as a state machine that reacts to events from the local root fragment as well as RPC responses from remote Drillbits.

      Parameters:
      foreman - the Foreman to retire
    • getForemanForQueryId

      public Foreman getForemanForQueryId(UserBitShared.QueryId queryId)
    • getContext

      public DrillbitContext getContext()
    • addFragmentRunner

      public void addFragmentRunner(FragmentExecutor fragmentExecutor)
      Currently used to start a root fragment that is not blocked on data, and leaf fragments.
      Parameters:
      fragmentExecutor - the executor to run
    • startFragmentPendingRemote

      public void startFragmentPendingRemote(FragmentManager fragmentManager)
      Currently used to start a root fragment that is blocked on data, and intermediate fragments. This method is called, when the first batch arrives.
      Parameters:
      fragmentManager - the manager for the fragment
    • getFragmentRunner

      public FragmentExecutor getFragmentRunner(ExecProtos.FragmentHandle handle)
    • receiveRuntimeFilter

      public void receiveRuntimeFilter(RuntimeFilterWritable runtimeFilter)
      receive the RuntimeFilter thorough the wire
      Parameters:
      runtimeFilter - runtime filter