public abstract class BaseOperatorContext extends Object implements OperatorContext
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.| Modifier and Type | Field and Description |
|---|---|
protected BufferAllocator |
allocator |
protected FragmentContext |
context |
protected BufferManager |
manager |
protected PhysicalOperator |
popConfig |
| Constructor and Description |
|---|
BaseOperatorContext(FragmentContext context,
BufferAllocator allocator,
PhysicalOperator popConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
BufferAllocator |
getAllocator()
Return the memory allocator for this operator.
|
ExecutionControls |
getExecutionControls() |
ExecutorService |
getExecutor() |
FragmentContext |
getFragmentContext() |
ControlsInjector |
getInjector()
Returns the fault injection mechanism used to introduce faults at runtime
for testing.
|
DrillBuf |
getManagedBuffer() |
DrillBuf |
getManagedBuffer(int size) |
String |
getName() |
<T extends PhysicalOperator> |
getOperatorDefn()
Return the physical operator definition created by the planner and passed
into the Drillbit executing the query.
|
ExecutorService |
getScanDecodeExecutor() |
ExecutorService |
getScanExecutor() |
<T extends Throwable> |
injectChecked(String desc,
Class<T> exceptionClass)
Insert a checked fault (exception) of the given class.
|
void |
injectUnchecked(String desc)
Insert an unchecked fault (exception).
|
DrillFileSystem |
newFileSystem(org.apache.hadoop.conf.Configuration conf)
Creates DrillFileSystem that automatically tracks operator stats.
|
DrillFileSystem |
newNonTrackingFileSystem(org.apache.hadoop.conf.Configuration conf)
Creates a DrillFileSystem that does not automatically track operator stats.
|
DrillBuf |
replace(DrillBuf old,
int newSize) |
void |
setInjector(ControlsInjector injector) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetStats, runCallableAsprotected final FragmentContext context
protected final BufferAllocator allocator
protected final PhysicalOperator popConfig
protected final BufferManager manager
public BaseOperatorContext(FragmentContext context, BufferAllocator allocator, PhysicalOperator popConfig)
public FragmentContext getFragmentContext()
getFragmentContext in interface OperatorContextpublic <T extends PhysicalOperator> T getOperatorDefn()
OperatorContextgetOperatorDefn in interface OperatorContextpublic String getName()
public DrillBuf replace(DrillBuf old, int newSize)
replace in interface OperatorContextpublic DrillBuf getManagedBuffer()
getManagedBuffer in interface OperatorContextpublic DrillBuf getManagedBuffer(int size)
getManagedBuffer in interface OperatorContextpublic ExecutionControls getExecutionControls()
getExecutionControls in interface OperatorContextpublic BufferAllocator getAllocator()
OperatorContextgetAllocator in interface OperatorContextpublic ExecutorService getExecutor()
getExecutor in interface OperatorContextpublic ExecutorService getScanExecutor()
getScanExecutor in interface OperatorContextpublic ExecutorService getScanDecodeExecutor()
getScanDecodeExecutor in interface OperatorContextpublic void setInjector(ControlsInjector injector)
setInjector in interface OperatorContextpublic ControlsInjector getInjector()
OperatorContextgetInjector in interface OperatorContextpublic void injectUnchecked(String desc)
OperatorContextinjectUnchecked in interface OperatorContextdesc - the description of the fault used to match a fault
injection parameter to determine if the fault should be injectedpublic <T extends Throwable> void injectChecked(String desc, Class<T> exceptionClass) throws T extends Throwable
OperatorContextinjectChecked in interface OperatorContextdesc - the description of the fault used to match a fault
injection parameter to determine if the fault should be injectedexceptionClass - the class of exeception to be thrownT - if the fault is enabledT extends Throwablepublic void close()
close in interface OperatorContextpublic DrillFileSystem newFileSystem(org.apache.hadoop.conf.Configuration conf) throws IOException
newFileSystem in interface OperatorContextIOExceptionpublic DrillFileSystem newNonTrackingFileSystem(org.apache.hadoop.conf.Configuration conf) throws IOException
newNonTrackingFileSystem in interface OperatorContextIOExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.