Package org.apache.drill.exec.ops
Class BaseOperatorContext
java.lang.Object
org.apache.drill.exec.ops.BaseOperatorContext
- All Implemented Interfaces:
- OperatorContext
Implementation of 
OperatorContext that provides services
 needed by most run-time operators. Excludes services that need the
 entire Drillbit. This class provides services common to the test-time
 version of the operator context and the full production-time context
 that includes network services.- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final BufferAllocatorprotected final FragmentContextprotected final BufferManagerprotected final PhysicalOperator
- 
Constructor SummaryConstructorsConstructorDescriptionBaseOperatorContext(FragmentContext context, BufferAllocator allocator, PhysicalOperator popConfig) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Return the memory allocator for this operator.Returns the fault injection mechanism used to introduce faults at runtime for testing.getManagedBuffer(int size) getName()<T extends PhysicalOperator>
 TReturn the physical operator definition created by the planner and passed into the Drillbit executing the query.<T extends Throwable>
 voidinjectChecked(String desc, Class<T> exceptionClass) Insert a checked fault (exception) of the given class.voidinjectUnchecked(String desc) Insert an unchecked fault (exception).newFileSystem(org.apache.hadoop.conf.Configuration conf) Creates DrillFileSystem that automatically tracks operator stats.newNonTrackingFileSystem(org.apache.hadoop.conf.Configuration conf) Creates a DrillFileSystem that does not automatically track operator stats.voidsetInjector(ControlsInjector injector) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.drill.exec.ops.OperatorContextgetStats, runCallableAs
- 
Field Details- 
context
- 
allocator
- 
popConfig
- 
manager
 
- 
- 
Constructor Details- 
BaseOperatorContextpublic BaseOperatorContext(FragmentContext context, BufferAllocator allocator, PhysicalOperator popConfig) 
 
- 
- 
Method Details- 
getFragmentContext- Specified by:
- getFragmentContextin interface- OperatorContext
 
- 
getOperatorDefnDescription copied from interface:OperatorContextReturn the physical operator definition created by the planner and passed into the Drillbit executing the query.- Specified by:
- getOperatorDefnin interface- OperatorContext
- Returns:
- the physical operator definition
 
- 
getName
- 
replace- Specified by:
- replacein interface- OperatorContext
 
- 
getManagedBuffer- Specified by:
- getManagedBufferin interface- OperatorContext
 
- 
getManagedBuffer- Specified by:
- getManagedBufferin interface- OperatorContext
 
- 
getExecutionControls- Specified by:
- getExecutionControlsin interface- OperatorContext
 
- 
getAllocatorDescription copied from interface:OperatorContextReturn the memory allocator for this operator.- Specified by:
- getAllocatorin interface- OperatorContext
- Returns:
- the per-operator memory allocator
 
- 
getExecutor- Specified by:
- getExecutorin interface- OperatorContext
 
- 
getScanExecutor- Specified by:
- getScanExecutorin interface- OperatorContext
 
- 
getScanDecodeExecutor- Specified by:
- getScanDecodeExecutorin interface- OperatorContext
 
- 
setInjector- Specified by:
- setInjectorin interface- OperatorContext
 
- 
getInjectorDescription copied from interface:OperatorContextReturns the fault injection mechanism used to introduce faults at runtime for testing.- Specified by:
- getInjectorin interface- OperatorContext
- Returns:
- the fault injector
 
- 
injectUncheckedDescription copied from interface:OperatorContextInsert an unchecked fault (exception). Handles the details of checking if fault injection is enabled and this particular fault is selected.- Specified by:
- injectUncheckedin interface- OperatorContext
- Parameters:
- desc- the description of the fault used to match a fault injection parameter to determine if the fault should be injected
 
- 
injectCheckedDescription copied from interface:OperatorContextInsert a checked fault (exception) of the given class. Handles the details of checking if fault injection is enabled and this particular fault is selected.- Specified by:
- injectCheckedin interface- OperatorContext
- Parameters:
- desc- the description of the fault used to match a fault injection parameter to determine if the fault should be injected
- exceptionClass- the class of exeception to be thrown
- Throws:
- T- if the fault is enabled
 
- 
closepublic void close()- Specified by:
- closein interface- OperatorContext
 
- 
newFileSystemCreates DrillFileSystem that automatically tracks operator stats. Only one tracking and no non-tracking file system per operator context.- Specified by:
- newFileSystemin interface- OperatorContext
- Throws:
- IOException
 
- 
newNonTrackingFileSystempublic DrillFileSystem newNonTrackingFileSystem(org.apache.hadoop.conf.Configuration conf) throws IOException Creates a DrillFileSystem that does not automatically track operator stats. Multiple non-tracking file system are allowed.- Specified by:
- newNonTrackingFileSystemin interface- OperatorContext
- Throws:
- IOException
 
 
-