public interface FragmentContext extends UdfUtilities, AutoCloseable
Modifier and Type | Interface and Description |
---|---|
static interface |
FragmentContext.ExecutorState |
INJECTABLE_GETTER_METHODS
Modifier and Type | Method and Description |
---|---|
void |
addRuntimeFilter(RuntimeFilterWritable runtimeFilter)
Add a RuntimeFilter when the RuntimeFilter receiver belongs to the same MinorFragment.
|
void |
close() |
AliasRegistryProvider |
getAliasRegistryProvider()
Get an instance of alias registry provider for obtaining aliases.
|
BufferAllocator |
getAllocator() |
CodeCompiler |
getCompiler() |
DrillConfig |
getConfig()
Returns the Drill configuration for this run.
|
ExecutionControls |
getExecutionControls()
Return the set of execution controls used to inject faults into running
code for testing.
|
ExecutorService |
getExecutor() |
FragmentContext.ExecutorState |
getExecutorState() |
String |
getFragIdString() |
org.apache.calcite.schema.SchemaPlus |
getFullRootSchema() |
FunctionLookupContext |
getFunctionRegistry()
Returns the UDF registry.
|
ExecProtos.FragmentHandle |
getHandle() |
<T> T |
getImplementationClass(ClassGenerator<T> cg)
Generates code for a class given a
ClassGenerator ,
and returns a single instance of the generated class. |
<T> List<T> |
getImplementationClass(ClassGenerator<T> cg,
int instanceCount)
Generates code for a class given a
ClassGenerator , and returns the
specified number of instances of the generated class. |
<T> T |
getImplementationClass(CodeGenerator<T> cg)
Generates code for a class given a
CodeGenerator ,
and returns a single instance of the generated class. |
<T> List<T> |
getImplementationClass(CodeGenerator<T> cg,
int instanceCount)
Get this node's identity.
|
DrillBuf |
getManagedBuffer()
For UDFs to allocate general purpose intermediate buffers we provide the
DrillBuf type as an injectable, which provides access to an off-heap
buffer that can be tracked by Drill and re-allocated as needed.
|
DrillBuf |
getManagedBuffer(int size) |
BufferManager |
getManagedBufferManager() |
MetastoreRegistry |
getMetastoreRegistry()
Get instance of Metastore registry to obtain Metastore instance if needed.
|
BufferAllocator |
getNewChildAllocator(String operatorName,
int operatorId,
long initialReservation,
long maximumReservation) |
OptionManager |
getOptions()
Returns a read-only version of the session options.
|
UserBitShared.QueryId |
getQueryId() |
String |
getQueryIdString() |
String |
getQueryUserName() |
RuntimeFilterWritable |
getRuntimeFilter(long rfIdentifier) |
RuntimeFilterWritable |
getRuntimeFilter(long rfIdentifier,
long maxWaitTime,
TimeUnit timeUnit)
Get the RuntimeFilter with a blocking wait, if the waiting option is enabled.
|
ExecutorService |
getScanDecodeExecutor() |
ExecutorService |
getScanExecutor() |
QueryContext.SqlStatementType |
getSQLStatementType()
Returns the statement type (e.g.
|
boolean |
isImpersonationEnabled() |
OperatorContext |
newOperatorContext(PhysicalOperator popConfig) |
OperatorContext |
newOperatorContext(PhysicalOperator popConfig,
OperatorStats stats) |
DrillBuf |
replace(DrillBuf old,
int newSize) |
void |
requestMemory(RecordBatch requestor)
An operator is experiencing memory pressure.
|
getConstantValueHolder, getContextInformation, getPartitionExplorer
FunctionLookupContext getFunctionRegistry()
OptionManager getOptions()
boolean isImpersonationEnabled()
<T> T getImplementationClass(ClassGenerator<T> cg)
ClassGenerator
,
and returns a single instance of the generated class. (Note
that the name is a misnomer, it would be better called
getImplementationInstance.)cg
- the class generator<T> T getImplementationClass(CodeGenerator<T> cg)
CodeGenerator
,
and returns a single instance of the generated class. (Note
that the name is a misnomer, it would be better called
getImplementationInstance.)cg
- the code generator<T> List<T> getImplementationClass(ClassGenerator<T> cg, int instanceCount)
ClassGenerator
, and returns the
specified number of instances of the generated class. (Note that the name
is a misnomer, it would be better called
getImplementationInstances.)cg
- the class generatorQueryContext.SqlStatementType getSQLStatementType()
QueryContext.SqlStatementType
, if known.<T> List<T> getImplementationClass(CodeGenerator<T> cg, int instanceCount)
ExecutionControls getExecutionControls()
DrillConfig getConfig()
CodeCompiler getCompiler()
ExecutorService getScanDecodeExecutor()
ExecutorService getScanExecutor()
ExecutorService getExecutor()
FragmentContext.ExecutorState getExecutorState()
BufferAllocator getNewChildAllocator(String operatorName, int operatorId, long initialReservation, long maximumReservation)
ExecProtos.FragmentHandle getHandle()
BufferAllocator getAllocator()
UserBitShared.QueryId getQueryId()
UUID
of the current queryString getQueryIdString()
UUID
of the current queryOperatorContext newOperatorContext(PhysicalOperator popConfig)
OperatorContext newOperatorContext(PhysicalOperator popConfig, OperatorStats stats)
org.apache.calcite.schema.SchemaPlus getFullRootSchema()
String getQueryUserName()
String getFragIdString()
DrillBuf getManagedBuffer()
UdfUtilities
getManagedBuffer
in interface UdfUtilities
DrillBuf getManagedBuffer(int size)
BufferManager getManagedBufferManager()
void close()
close
in interface AutoCloseable
void addRuntimeFilter(RuntimeFilterWritable runtimeFilter)
runtimeFilter
- runtime filterRuntimeFilterWritable getRuntimeFilter(long rfIdentifier)
RuntimeFilterWritable getRuntimeFilter(long rfIdentifier, long maxWaitTime, TimeUnit timeUnit)
rfIdentifier
- runtime filter identifiermaxWaitTime
- max wait timetimeUnit
- time unitMetastoreRegistry getMetastoreRegistry()
AliasRegistryProvider getAliasRegistryProvider()
void requestMemory(RecordBatch requestor)
OutOfMemoryException
.Copyright © 1970 The Apache Software Foundation. All rights reserved.