public interface ExecutionContext extends MetadataContext
ExecutableOperator.execute(ExecutionContext)
.
This contains methods for looking up physical ports associated with
logical ports and other execution-time information.ExecutableOperator
Modifier and Type | Method and Description |
---|---|
Path |
allocateTemporaryStorage()
Allocates space for storing a temporary file or files.
|
DistributedCallableContext |
getDistributedCallableContext()
Public only as a matter if implementation; operator authors should not invoke this method.
|
FileClient |
getFileClient()
Returns the file client to be used within the graph
|
PhysicalInputPort |
getInputPort(LogicalPort logicalPort)
Returns the physical port for the given logical port.
|
PhysicalInputPort |
getInputPort(LogicalPort logicalPort,
int copyNumber)
Returns the physical port for the given logical port.
|
IOMonitoringContext |
getIOMonitor()
Returns a monitoring context to allow I/O operators to report statistics.
|
NodeAllocationPlan |
getNodeAllocation()
Returns the initial node allocation for the graph to which this operator belongs.
|
PhysicalOutputPort |
getOutputPort(LogicalPort logicalPort)
Returns the physical port for the given logical port.
|
PartitionInstanceInfo |
getPartitionInfo()
Returns partition id information for the partition being executed.
|
RecordInputSelector |
getRecordInputSelector(List<RecordInput> inputs)
Creates a selector over the specified inputs.
|
StatisticsRegistry |
getStatisticsRegistry()
Returns a statistics registry that can be used for registering custom statistics.
|
LogicalGraph |
newSubgraph()
Creates a new subgraph to use within this execution context.
|
LogicalGraph |
newSubgraph(String name)
Creates a new subgraph to use within this execution context.
|
getCombinedMetadata, getEngineConfig, getMaxParallelism, getPath, getRequiredMetadata, getSourceMaxParallelism, getSourceMetadata, isParallel, isSourceConnected, isSourceParallel
FileClient getFileClient()
The resulting client is initially instrumented using the monitoring context
returned from getIOMonitor()
. Therefore file I/O statistics will
be collected by default on any file opened using the client.
getFileClient
in interface MetadataContext
PartitionInstanceInfo getPartitionInfo()
PhysicalInputPort getInputPort(LogicalPort logicalPort)
LogicalPort
.
For example:
//get the physical port for the "input" RecordPort
input.getInput
(ctx)
logicalPort
- the logical input portPhysicalInputPort getInputPort(LogicalPort logicalPort, int copyNumber)
LogicalPort
.
For example:
//get the physical port for the "input" RecordPort
input.getInput
(ctx,copyNumber)
logicalPort
- the logical input portcopyNumber
- the copy numberPhysicalOutputPort getOutputPort(LogicalPort logicalPort)
LogicalPort
.
For example:
//get the physical port for the "output" RecordPort
output.getOutput
(ctx)
logicalPort
- the logical output portIOMonitoringContext getIOMonitor()
NodeAllocationPlan getNodeAllocation()
Path allocateTemporaryStorage()
The temporary storage is not valid for use outside the scope
of the ExecutableOperator.execute(ExecutionContext)
method.
The caller is responsible for cleaning up any files written
in the allocated location, even on failure of the executing
graph. It is therefore recommended to wrap the using code in
the scope of a try-finally block.
DistributedCallableContext getDistributedCallableContext()
StatisticsRegistry getStatisticsRegistry()
LogicalGraph newSubgraph()
MetadataContext.getEngineConfig()
. Statistics calculated by the subgraph will
be aggregated and will appear in the statistics of this operator.LogicalGraph newSubgraph(String name)
MetadataContext.getEngineConfig()
. Statistics calculated by the subgraph will
be aggregated and will appear in the statistics of this operator.name
- the name of the subgraphRecordInputSelector getRecordInputSelector(List<RecordInput> inputs)
inputs
- the set of input ports to register with the selectorCopyright © 2021 Actian Corporation. All rights reserved.