public interface MetadataContext
Modifier and Type | Method and Description |
---|---|
PortMetadata |
getCombinedMetadata(LogicalPort logicalPort)
Returns the source metadata combined with the required metadata to determine the actual metadata
that the operator will receive.
|
EngineConfig |
getEngineConfig()
Returns the engine settings that were passed to the graph being composed/executed.
|
FileClient |
getFileClient()
Returns the file client to be used within the graph
|
int |
getMaxParallelism()
Returns the max parallelism of the current operator.
|
GraphPath |
getPath()
Returns the path of the operator being composed.
|
PortMetadata |
getRequiredMetadata(LogicalPort logicalPort)
Gets the required metadata for the given input.
|
int |
getSourceMaxParallelism(LogicalPort port)
Returns whether the max parallelism of the source of this port.
|
PortMetadata |
getSourceMetadata(LogicalPort logicalPort)
Returns the source metadata associated with the given port.
|
boolean |
isParallel()
Deprecated.
Use
getMaxParallelism() instead. |
boolean |
isSourceConnected(LogicalPort inPort)
Tests whether the given input port is connected.
|
boolean |
isSourceParallel(LogicalPort port)
Deprecated.
Use
getSourceMaxParallelism(LogicalPort) instead. |
PortMetadata getSourceMetadata(LogicalPort logicalPort)
LogicalPort
.
For example:
//get the record type for the "input" RecordPort input.getType
(ctx) //get the full record metadata for the "input" RecordPort input.getSourceMetadata
(ctx)
logicalPort
- the input portPortMetadata getRequiredMetadata(LogicalPort logicalPort)
LogicalPort
.
For example:
//get the required data ordering for the "input" record port
input.getRequiredDataOrdering
(ctx)
logicalPort
- must be an input port for a non-composite operatorPortMetadata getCombinedMetadata(LogicalPort logicalPort)
LogicalPort
.
For example:
//get the required data ordering for the "input" record port
input.getCombinedDataOrdering
(ctx)
logicalPort
- must be an input port for a non-composite operator.boolean isSourceParallel(LogicalPort port)
getSourceMaxParallelism(LogicalPort)
instead.port
- the portint getSourceMaxParallelism(LogicalPort port)
ParallelismStrategy
.
For example, this is used by ParallelismStrategy.NEGOTIATE_BASED_ON_SOURCE
to determine parallelism of an operator
based on the input parallelism.port
- the portboolean isParallel()
getMaxParallelism()
instead.StreamingMetadataContext.setParallelizable(boolean)
and
distribution was not disabled via OperatorSettings#isParallelismDisabled()
.
For CompositeOperator
's and IterativeOperator
's this will be true as
long as parallelism has not been disabled; if it returns true, the composite node may consist
of a mixture of parallel and non-parallel components.int getMaxParallelism()
StreamingMetadataContext.parallelize(ParallelismStrategy)
.
For CompositeOperator
's and IterativeOperator
's this will be equal to
that specified via OperatorSettings.getMaxParallelism()
; if it returns a value other than 1, the composite or iterative
node may consist of a mixture of parallel and non-parallel components.boolean isSourceConnected(LogicalPort inPort)
"optional"
since graph compilation will fail unless all non-optional ports are connected.inPort
- must be an input portGraphPath getPath()
EngineConfig getEngineConfig()
FileClient getFileClient()
Copyright © 2016 Actian Corporation. All rights reserved.