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, wait
getStats, runCallableAs
protected 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 OperatorContext
public <T extends PhysicalOperator> T getOperatorDefn()
OperatorContext
getOperatorDefn
in interface OperatorContext
public String getName()
public DrillBuf replace(DrillBuf old, int newSize)
replace
in interface OperatorContext
public DrillBuf getManagedBuffer()
getManagedBuffer
in interface OperatorContext
public DrillBuf getManagedBuffer(int size)
getManagedBuffer
in interface OperatorContext
public ExecutionControls getExecutionControls()
getExecutionControls
in interface OperatorContext
public BufferAllocator getAllocator()
OperatorContext
getAllocator
in interface OperatorContext
public ExecutorService getExecutor()
getExecutor
in interface OperatorContext
public ExecutorService getScanExecutor()
getScanExecutor
in interface OperatorContext
public ExecutorService getScanDecodeExecutor()
getScanDecodeExecutor
in interface OperatorContext
public void setInjector(ControlsInjector injector)
setInjector
in interface OperatorContext
public ControlsInjector getInjector()
OperatorContext
getInjector
in interface OperatorContext
public void injectUnchecked(String desc)
OperatorContext
injectUnchecked
in interface OperatorContext
desc
- 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
OperatorContext
injectChecked
in interface OperatorContext
desc
- 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 Throwable
public void close()
close
in interface OperatorContext
public DrillFileSystem newFileSystem(org.apache.hadoop.conf.Configuration conf) throws IOException
newFileSystem
in interface OperatorContext
IOException
public DrillFileSystem newNonTrackingFileSystem(org.apache.hadoop.conf.Configuration conf) throws IOException
newNonTrackingFileSystem
in interface OperatorContext
IOException
Copyright © 1970 The Apache Software Foundation. All rights reserved.