public static class CoGroupOperator.Builder extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
CoGroupOperator.Builder(UserCodeWrapper<CoGroupFunction<Record,Record,Record>> udf)
Creates a Builder with the provided
CoGroupFunction implementation. |
protected |
CoGroupOperator.Builder(UserCodeWrapper<CoGroupFunction<Record,Record,Record>> udf,
Class<? extends Key<?>> keyClass,
int keyColumn1,
int keyColumn2)
Creates a Builder with the provided
CoGroupFunction implementation. |
| Modifier and Type | Method and Description |
|---|---|
CoGroupOperator |
build()
Creates and returns a CoGroupOperator from using the values given
to the builder.
|
CoGroupOperator.Builder |
input1(Operator<Record>... inputs)
Sets one or several inputs (union) for input 1.
|
CoGroupOperator.Builder |
input1(Operator<Record> input)
Sets the input operator for input 1.
|
CoGroupOperator.Builder |
input2(Operator<Record>... inputs)
Sets one or several inputs (union) for input 2.
|
CoGroupOperator.Builder |
input2(Operator<Record> input)
Sets the input operator for input 2.
|
CoGroupOperator.Builder |
inputs1(List<Operator<Record>> inputs)
Sets the first inputs.
|
CoGroupOperator.Builder |
inputs2(List<Operator<Record>> inputs)
Sets the second inputs.
|
CoGroupOperator.Builder |
keyField(Class<? extends Key<?>> keyClass,
int keyColumn1,
int keyColumn2)
Adds additional key field.
|
CoGroupOperator.Builder |
name(String name)
Sets the name of this operator.
|
CoGroupOperator.Builder |
secondaryOrder1(Ordering order)
Sets the order of the elements within a group for the first input.
|
CoGroupOperator.Builder |
secondaryOrder2(Ordering order)
Sets the order of the elements within a group for the second input.
|
CoGroupOperator.Builder |
setBroadcastVariable(String name,
Operator<Record> input)
Binds the result produced by a plan rooted at
root to a
variable used by the UDF wrapped in this operator. |
CoGroupOperator.Builder |
setBroadcastVariables(Map<String,Operator<Record>> inputs)
Binds multiple broadcast variables.
|
protected CoGroupOperator.Builder(UserCodeWrapper<CoGroupFunction<Record,Record,Record>> udf, Class<? extends Key<?>> keyClass, int keyColumn1, int keyColumn2)
CoGroupFunction implementation.udf - The CoGroupFunction implementation for this CoGroup operator.keyClass - The class of the key data type.keyColumn1 - The position of the key in the first input's records.keyColumn2 - The position of the key in the second input's records.protected CoGroupOperator.Builder(UserCodeWrapper<CoGroupFunction<Record,Record,Record>> udf)
CoGroupFunction implementation. This method is intended
for special case sub-types only.udf - The CoGroupFunction implementation for this CoGroup operator.public CoGroupOperator.Builder keyField(Class<? extends Key<?>> keyClass, int keyColumn1, int keyColumn2)
keyClass - The class of the key data type.keyColumn1 - The position of the key in the first input's records.keyColumn2 - The position of the key in the second input's records.public CoGroupOperator.Builder secondaryOrder1(Ordering order)
order - The order for the elements in a group.public CoGroupOperator.Builder secondaryOrder2(Ordering order)
order - The order for the elements in a group.public CoGroupOperator.Builder input1(Operator<Record> input)
input - The input operator for input 1.public CoGroupOperator.Builder input1(Operator<Record>... inputs)
inputs - public CoGroupOperator.Builder input2(Operator<Record> input)
input - The input operator for input 2.public CoGroupOperator.Builder input2(Operator<Record>... inputs)
inputs - public CoGroupOperator.Builder inputs1(List<Operator<Record>> inputs)
inputs - public CoGroupOperator.Builder inputs2(List<Operator<Record>> inputs)
inputs - public CoGroupOperator.Builder setBroadcastVariable(String name, Operator<Record> input)
root to a
variable used by the UDF wrapped in this operator.public CoGroupOperator.Builder setBroadcastVariables(Map<String,Operator<Record>> inputs)
public CoGroupOperator.Builder name(String name)
name - public CoGroupOperator build()
Copyright © 2015 The Apache Software Foundation. All rights reserved.