public class OwnerAggregatorServerData extends Object
| Constructor and Description | 
|---|
| OwnerAggregatorServerData(org.apache.hadoop.util.Progressable progressable)Constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| org.apache.hadoop.io.Writable | createInitialValue(String name)Create initial value for a reducer. | 
| Iterable<Map.Entry<String,org.apache.hadoop.io.Writable>> | getMyReducedValuesWhenReady(Set<Integer> workerIds)This function will wait until all partial aggregated values from all
 workers are ready and aggregated, and return final aggregated values
 afterwards. | 
| void | receivedRequestCountFromWorker(long requestCount,
                              int taskId)Notify this object about the total number of requests which should
 arrive from one of the workers. | 
| void | receivedRequestFromWorker()Notify this object that a partial aggregated values request from some
 worker have been received. | 
| void | reduce(String name,
      org.apache.hadoop.io.Writable value)Reduce partial value of one of current worker's reducers. | 
| void | registerReducer(String name,
               ReduceOperation<Object,org.apache.hadoop.io.Writable> reduceOp)Register a reducer which current worker owns. | 
| void | reset()Prepare for next superstep | 
public OwnerAggregatorServerData(org.apache.hadoop.util.Progressable progressable)
progressable - Progressable used to report progresspublic void registerReducer(String name, ReduceOperation<Object,org.apache.hadoop.io.Writable> reduceOp)
name - Name of aggregatorreduceOp - Reduce operationpublic void reduce(String name, org.apache.hadoop.io.Writable value)
name - Name of the reducervalue - Value to reduce to itpublic org.apache.hadoop.io.Writable createInitialValue(String name)
name - Name of the reducerpublic void receivedRequestFromWorker()
public void receivedRequestCountFromWorker(long requestCount,
                                           int taskId)
requestCount - Number of requests which should arrivetaskId - Task id of that workerpublic Iterable<Map.Entry<String,org.apache.hadoop.io.Writable>> getMyReducedValuesWhenReady(Set<Integer> workerIds)
workerIds - All workers in the job apart from the current onepublic void reset()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.