Package org.apache.drill.exec.testing
Class ExecutionControls
java.lang.Object
org.apache.drill.exec.testing.ExecutionControls
Tracks the simulated controls that will be injected for testing purposes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe JSON specified for theExecConstants.DRILLBIT_CONTROL_INJECTIONSoption is validated using this class.static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.fasterxml.jackson.databind.ObjectMapperstatic final StringThe default value for controls. -
Constructor Summary
ConstructorsConstructorDescriptionExecutionControls(OptionManager options) ExecutionControls(OptionManager options, CoordinationProtos.DrillbitEndpoint endpoint) -
Method Summary
Modifier and TypeMethodDescriptionlookupCountDownLatchInjection(ExecutionControlsInjector injector, String desc) Look for a count down latch injection matching the given injector, site descriptor, and endpoint.lookupExceptionInjection(ExecutionControlsInjector injector, String desc) Look for an exception injection matching the given injector, site descriptor, and endpoint.lookupPauseInjection(ExecutionControlsInjector injector, String desc) Look for an pause injection matching the given injector, site descriptor, and endpoint.voidThis method resumes all pauses within the current context (QueryContext or FragmentContext).static voidvalidateControlsString(String jsonString)
-
Field Details
-
controlsOptionMapper
public static final com.fasterxml.jackson.databind.ObjectMapper controlsOptionMapper -
EMPTY_CONTROLS
The default value for controls.- See Also:
-
-
Constructor Details
-
ExecutionControls
-
ExecutionControls
-
-
Method Details
-
validateControlsString
- Throws:
IOException
-
lookupExceptionInjection
Look for an exception injection matching the given injector, site descriptor, and endpoint.- Parameters:
injector- the injector, which indicates a classdesc- the injection site description- Returns:
- the exception injection, if there is one for the injector, site and endpoint; null otherwise
-
lookupPauseInjection
Look for an pause injection matching the given injector, site descriptor, and endpoint.- Parameters:
injector- the injector, which indicates a classdesc- 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 classdesc- 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).
-