Package org.apache.drill.exec.ops
Class BaseFragmentContext
java.lang.Object
org.apache.drill.exec.ops.BaseFragmentContext
- All Implemented Interfaces:
AutoCloseable,FragmentContext,UdfUtilities
- Direct Known Subclasses:
FragmentContextImpl
Common implementation for both the test and production versions
of the fragment context.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.exec.ops.FragmentContext
FragmentContext.ExecutorState -
Field Summary
Fields inherited from interface org.apache.drill.exec.ops.UdfUtilities
INJECTABLE_GETTER_METHODS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract BufferManagerReturns the UDF registry.<T> TGenerates code for a class given aClassGenerator, and returns a single instance of the generated class.<T> List<T> getImplementationClass(ClassGenerator<T> cg, int instanceCount) Generates code for a class given aClassGenerator, and returns the specified number of instances of the generated class.<T> TGenerates code for a class given aCodeGenerator, and returns a single instance of the generated class.<T> List<T> getImplementationClass(CodeGenerator<T> cg, int instanceCount) Get this node's identity.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.getManagedBuffer(int size) Returns the statement type (e.g.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.drill.exec.ops.FragmentContext
addRuntimeFilter, close, getAliasRegistryProvider, getAllocator, getCompiler, getConfig, getExecutionControls, getExecutor, getExecutorState, getFragIdString, getFullRootSchema, getHandle, getMetastoreRegistry, getNewChildAllocator, getOptions, getRuntimeFilter, getRuntimeFilter, getScanDecodeExecutor, getScanExecutor, isImpersonationEnabled, newOperatorContext, newOperatorContext, requestMemoryMethods inherited from interface org.apache.drill.exec.ops.UdfUtilities
getConstantValueHolder, getContextInformation, getDrillbitContext, getPartitionExplorer, getResultSetLoader
-
Constructor Details
-
BaseFragmentContext
-
-
Method Details
-
getFunctionRegistry
Description copied from interface:FragmentContextReturns the UDF registry.- Specified by:
getFunctionRegistryin interfaceFragmentContext- Returns:
- the UDF registry
-
getImplementationClass
Description copied from interface:FragmentContextGenerates code for a class given aClassGenerator, and returns a single instance of the generated class. (Note that the name is a misnomer, it would be better called getImplementationInstance.)- Specified by:
getImplementationClassin interfaceFragmentContext- Parameters:
cg- the class generator- Returns:
- an instance of the generated class
-
getImplementationClass
Description copied from interface:FragmentContextGenerates code for a class given aCodeGenerator, and returns a single instance of the generated class. (Note that the name is a misnomer, it would be better called getImplementationInstance.)- Specified by:
getImplementationClassin interfaceFragmentContext- Parameters:
cg- the code generator- Returns:
- an instance of the generated class
-
getImplementationClass
Description copied from interface:FragmentContextGenerates code for a class given aClassGenerator, and returns the specified number of instances of the generated class. (Note that the name is a misnomer, it would be better called getImplementationInstances.)- Specified by:
getImplementationClassin interfaceFragmentContext- Parameters:
cg- the class generator- Returns:
- list of instances of the generated class
-
getImplementationClass
Description copied from interface:FragmentContextGet this node's identity.- Specified by:
getImplementationClassin interfaceFragmentContext- Returns:
- A DrillbitEndpoint object.
-
getBufferManager
-
replace
- Specified by:
replacein interfaceFragmentContext
-
getManagedBuffer
Description copied from interface:UdfUtilitiesFor 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.- Specified by:
getManagedBufferin interfaceFragmentContext- Specified by:
getManagedBufferin interfaceUdfUtilities- Returns:
- - a buffer managed by Drill, connected to the fragment allocator for memory management
-
getManagedBuffer
- Specified by:
getManagedBufferin interfaceFragmentContext
-
getQueryUserName
- Specified by:
getQueryUserNamein interfaceFragmentContext
-
getQueryId
- Specified by:
getQueryIdin interfaceFragmentContext- Returns:
- ID
UUIDof the current query
-
getQueryIdString
- Specified by:
getQueryIdStringin interfaceFragmentContext- Returns:
- The string representation of the ID
UUIDof the current query
-
getSQLStatementType
Description copied from interface:FragmentContextReturns the statement type (e.g. SELECT, CTAS, ANALYZE) from the query context.- Specified by:
getSQLStatementTypein interfaceFragmentContext- Returns:
- query statement type
QueryContext.SqlStatementType, if known.
-
getManagedBufferManager
- Specified by:
getManagedBufferManagerin interfaceFragmentContext
-