public interface LogicalOperator
LogicalGraph
.
Implementations must not extend this class directly; instead they must extend one of the following sub-classes:
public class MyOperator extendsExecutableOperator
{ //create an input record port--should be declared as final private finalRecordPort
input=newRecordInput
("input"); //create an output record port--should be declared as final private finalRecordPort
output=newRecordOutput
("output"); //declare a config property with a default value, must be non-final private int myConfigProperty= 5; //required: default constructor: initializes everything to their defaults public MyOperator() { } //optional: one or more convenience constructors to specify values for configuration properties public MyOperator(int myConfigProperty) { setMyConfigProperty(myConfigProperty); } //required: public getter for each input port publicRecordPort
getInput() { return input; } //required: public getter for each output port publicRecordPort
getOutput() { return output; } //required: public getter for each configuration property public int getMyConfigProperty() { return myConfigProperty; } //required: public setter for each configuration property public void setMyConfigProperty(int myConfigProperty) { this.myConfigProperty= myConfigProperty; } }
ExecutableOperator
; here we use JSON as the default implementation
of clone.
By following the "Java Bean" standard, described in the previous section, JSON serialization/deserialization is mostly automatic:
@JsonIgnore
tags to the
setters to ignore, an explicit @JsonProperty
tag to the single setter to use,
and an explicit @JsonProperty
tag to the single getter to use.@JsonTypeName
annotation on the operator. Operators
declared with shortcut type names must also be registered via the TypeResolutionProvider
service.Modifier and Type | Method and Description |
---|---|
void |
disableParallelism()
Can be called to forcible disable parallelism for the given
operator (and children if this is a
CompositeOperator ). |
Namespace<LogicalPort> |
getInputPorts()
Returns the list of input ports.
|
Namespace<LogicalPort> |
getOutputPorts()
Returns the list of output ports.
|
Namespace<LogicalPort> getInputPorts()
getInput()
, etc
to obtain a handle to input ports.Namespace<LogicalPort> getOutputPorts()
getOutput()
, etc
to obtain a handle to input ports.void disableParallelism()
CompositeOperator
).
This method should be used sparingly since it will degrade performance significantly; but is needed in certain cases.
For example:
RunScript
operator that contains a non-parallelizable scriptDeriveFields
operator that contains a non-parallelizable functionCopyright © 2016 Actian Corporation. All rights reserved.