public abstract class Operator extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.conf.Configuration |
_configuration
Configuration parameters.
|
protected org.apache.spark.api.java.JavaPairRDD<java.lang.Object,?>[] |
_inputData
The input data to this operator.
|
protected int |
_numInstances
The number of parallel instances for this operator.
|
protected java.lang.Object |
_stub
The function to execute.
|
Constructor and Description |
---|
Operator(int numInputs,
java.lang.Object stub,
java.lang.String name)
Create a new Operator.
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.spark.api.java.JavaPairRDD<java.lang.Object,?> |
_getOutput()
Read the inputs and execute the operator to generate the output.
|
abstract org.apache.spark.api.java.JavaPairRDD<java.lang.Object,?> |
execute()
Execute the operator.
|
org.apache.hadoop.conf.Configuration |
getParameters()
Get the configuration parameters.
|
int |
numInputs()
Get the number of input operators.
|
void |
setDegreeOfParallelism(int numInstances)
Set the number of parallel instances to execute.
|
void |
setInput(int index,
Operator output)
Set the input operator at an index.
|
void |
setInput(Operator output)
Set the (first) input operator.
|
protected int _numInstances
protected org.apache.hadoop.conf.Configuration _configuration
protected org.apache.spark.api.java.JavaPairRDD<java.lang.Object,?>[] _inputData
protected java.lang.Object _stub
public Operator(int numInputs, java.lang.Object stub, java.lang.String name)
numInputs
- the number of input operatorsstub
- the function to executename
- the name of the operatorpublic int numInputs()
public org.apache.hadoop.conf.Configuration getParameters()
public void setDegreeOfParallelism(int numInstances)
public abstract org.apache.spark.api.java.JavaPairRDD<java.lang.Object,?> execute() throws IllegalActionException
IllegalActionException
protected org.apache.spark.api.java.JavaPairRDD<java.lang.Object,?> _getOutput() throws java.lang.Exception
java.lang.Exception