Class ExecutionControls

java.lang.Object
org.apache.drill.exec.testing.ExecutionControls

public final class ExecutionControls extends Object
Tracks the simulated controls that will be injected for testing purposes.
  • Field Details

    • controlsOptionMapper

      public static final com.fasterxml.jackson.databind.ObjectMapper controlsOptionMapper
    • EMPTY_CONTROLS

      public static final String EMPTY_CONTROLS
      The default value for controls.
      See Also:
  • Constructor Details

  • Method Details

    • validateControlsString

      public static void validateControlsString(String jsonString) throws IOException
      Throws:
      IOException
    • lookupExceptionInjection

      public ExceptionInjection lookupExceptionInjection(ExecutionControlsInjector injector, String desc)
      Look for an exception injection matching the given injector, site descriptor, and endpoint.
      Parameters:
      injector - the injector, which indicates a class
      desc - the injection site description
      Returns:
      the exception injection, if there is one for the injector, site and endpoint; null otherwise
    • lookupPauseInjection

      public PauseInjection lookupPauseInjection(ExecutionControlsInjector injector, String desc)
      Look for an pause injection matching the given injector, site descriptor, and endpoint.
      Parameters:
      injector - the injector, which indicates a class
      desc - the injection site description
      Returns:
      the pause injection, if there is one for the injector, site and endpoint; null otherwise
    • lookupCountDownLatchInjection

      public CountDownLatchInjection lookupCountDownLatchInjection(ExecutionControlsInjector injector, String desc)
      Look for a count down latch injection matching the given injector, site descriptor, and endpoint.
      Parameters:
      injector - the injector, which indicates a class
      desc - the injection site description
      Returns:
      the count down latch injection, if there is one for the injector, site and endpoint; otherwise, a latch that does nothing
    • unpauseAll

      public void unpauseAll()
      This method resumes all pauses within the current context (QueryContext or FragmentContext).