IN1
- First input type of the user functionIN2
- Second input type of the user functionOUT
- Output type of the user functionFT
- Type of the user function@Internal public abstract class DualInputOperator<IN1,IN2,OUT,FT extends Function> extends AbstractUdfOperator<OUT,FT>
Modifier and Type | Field and Description |
---|---|
protected Operator<IN1> |
input1
The operator producing the first input.
|
protected Operator<IN2> |
input2
The operator producing the second input.
|
broadcastInputs, userFunction
compilerHints, name, operatorInfo, parameters
Modifier | Constructor and Description |
---|---|
protected |
DualInputOperator(UserCodeWrapper<FT> stub,
BinaryOperatorInformation<IN1,IN2,OUT> operatorInfo,
int[] keyPositions1,
int[] keyPositions2,
String name)
Creates a new abstract dual-input operator with the given name wrapping the given user function.
|
protected |
DualInputOperator(UserCodeWrapper<FT> stub,
BinaryOperatorInformation<IN1,IN2,OUT> operatorInfo,
String name)
Creates a new abstract dual-input Pact with the given name wrapping the given user function.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor<Operator<?>> visitor)
Contains the logic to invoke the visitor and continue the traversal.
|
void |
addFirstInput(Operator<IN1>... input)
Deprecated.
This method will be removed in future versions. Use the
Union operator instead. |
void |
addFirstInputs(List<Operator<IN1>> inputs)
Deprecated.
This method will be removed in future versions. Use the
Union operator instead. |
void |
addSecondInput(Operator<IN2>... input)
Deprecated.
This method will be removed in future versions. Use the
Union operator instead. |
void |
addSecondInputs(List<Operator<IN2>> inputs)
Deprecated.
This method will be removed in future versions. Use the
Union operator instead. |
void |
clearFirstInput()
Clears this operator's first input.
|
void |
clearSecondInput()
Clears this operator's second input.
|
protected abstract List<OUT> |
executeOnCollections(List<IN1> inputData1,
List<IN2> inputData2,
RuntimeContext runtimeContext,
ExecutionConfig executionConfig) |
Operator<IN1> |
getFirstInput()
Returns the first input, or null, if none is set.
|
int[] |
getKeyColumns(int inputNum)
Gets the column numbers of the key fields in the input records for the given input.
|
int |
getNumberOfInputs()
Gets the number of inputs for this operator.
|
BinaryOperatorInformation<IN1,IN2,OUT> |
getOperatorInfo()
Gets the information about the operators input/output types.
|
Operator<IN2> |
getSecondInput()
Returns the second input, or null, if none is set.
|
DualInputSemanticProperties |
getSemanticProperties() |
void |
setFirstInput(Operator<IN1>... inputs)
Deprecated.
This method will be removed in future versions. Use the
Union operator instead. |
void |
setFirstInput(Operator<IN1> input)
Clears all previous connections and connects the first input to the task wrapped in this contract
|
void |
setFirstInputs(List<Operator<IN1>> inputs)
Deprecated.
This method will be removed in future versions. Use the
Union operator instead. |
void |
setSecondInput(Operator<IN2>... inputs)
Deprecated.
This method will be removed in future versions. Use the
Union operator instead. |
void |
setSecondInput(Operator<IN2> input)
Clears all previous connections and connects the second input to the task wrapped in this contract
|
void |
setSecondInputs(List<Operator<IN2>> inputs)
Deprecated.
This method will be removed in future versions. Use the
Union operator instead. |
void |
setSemanticProperties(DualInputSemanticProperties semanticProperties) |
asArray, emptyClassArray, getBroadcastInputs, getUserCodeWrapper, setBroadcastVariable, setBroadcastVariables
createUnionCascade, createUnionCascade, createUnionCascade, getCompilerHints, getMinResources, getName, getParallelism, getParameters, getPreferredResources, setName, setParallelism, setParameter, setParameter, setParameter, setResources, toString
protected DualInputOperator(UserCodeWrapper<FT> stub, BinaryOperatorInformation<IN1,IN2,OUT> operatorInfo, String name)
stub
- The class containing the user function.name
- The given name for the operator, used in plans, logs and progress messages.protected DualInputOperator(UserCodeWrapper<FT> stub, BinaryOperatorInformation<IN1,IN2,OUT> operatorInfo, int[] keyPositions1, int[] keyPositions2, String name)
stub
- The object containing the user function.keyPositions1
- The positions of the fields in the first input that act as keys.keyPositions2
- The positions of the fields in the second input that act as keys.name
- The given name for the operator, used in plans, logs and progress messages.public BinaryOperatorInformation<IN1,IN2,OUT> getOperatorInfo()
getOperatorInfo
in class Operator<OUT>
public Operator<IN1> getFirstInput()
public Operator<IN2> getSecondInput()
public void clearFirstInput()
public void clearSecondInput()
public void setFirstInput(Operator<IN1> input)
input
- The contract that is connected as the first input.public void setSecondInput(Operator<IN2> input)
input
- The contract that is connected as the second input.@Deprecated public void setFirstInput(Operator<IN1>... inputs)
Union
operator instead.inputs
- The operator(s) that form the first input.@Deprecated public void setSecondInput(Operator<IN2>... inputs)
Union
operator instead.inputs
- The operator(s) that form the second input.@Deprecated public void setFirstInputs(List<Operator<IN1>> inputs)
Union
operator instead.inputs
- The operator(s) that form the first inputs.@Deprecated public void setSecondInputs(List<Operator<IN2>> inputs)
Union
operator instead.inputs
- The operator(s) that form the second inputs.@Deprecated public void addFirstInput(Operator<IN1>... input)
Union
operator instead.input
- The operator(s) to be unioned with the first input.@Deprecated public void addSecondInput(Operator<IN2>... input)
Union
operator instead.input
- The operator(s) to be unioned with the second input.@Deprecated public void addFirstInputs(List<Operator<IN1>> inputs)
Union
operator instead.inputs
- The operator(s) to be unioned with the first input.@Deprecated public void addSecondInputs(List<Operator<IN2>> inputs)
Union
operator instead.inputs
- The operator(s) to be unioned with the second input.public DualInputSemanticProperties getSemanticProperties()
public void setSemanticProperties(DualInputSemanticProperties semanticProperties)
public final int getNumberOfInputs()
AbstractUdfOperator
getNumberOfInputs
in class AbstractUdfOperator<OUT,FT extends Function>
public int[] getKeyColumns(int inputNum)
AbstractUdfOperator
getKeyColumns
in class AbstractUdfOperator<OUT,FT extends Function>
public void accept(Visitor<Operator<?>> visitor)
Visitable
A typical code example is the following:
public void accept(Visitor<Operator> visitor) {
boolean descend = visitor.preVisit(this);
if (descend) {
if (this.input != null) {
this.input.accept(visitor);
}
visitor.postVisit(this);
}
}
visitor
- The visitor to be called with this object as the parameter.Visitor.preVisit(Visitable)
,
Visitor.postVisit(Visitable)
protected abstract List<OUT> executeOnCollections(List<IN1> inputData1, List<IN2> inputData2, RuntimeContext runtimeContext, ExecutionConfig executionConfig) throws Exception
Exception
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.