public static class AllReduceBatchOperation.ReduceFnImpl extends java.lang.Object implements ReduceFunction
Modifier and Type | Method and Description |
---|---|
void |
init(Config cfg,
DataFlowOperation op,
java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> expectedIds)
Initialize the function
|
java.lang.Object |
reduce(java.lang.Object t1,
java.lang.Object t2)
Reduce t1 and t2 to a single value
|
public void init(Config cfg, DataFlowOperation op, java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> expectedIds)
ReduceFunction
init
in interface ReduceFunction
cfg
- configurationop
- optionsexpectedIds
- for each target, expected source idspublic java.lang.Object reduce(java.lang.Object t1, java.lang.Object t2)
ReduceFunction
reduce
in interface ReduceFunction
t1
- first valuet2
- second value