public class WorkerAggregatorHandler.ThreadLocalWorkerGlobalCommUsage extends Object implements WorkerThreadGlobalCommUsage
WorkerThreadGlobalCommUsage.
We can use one instance of this object per thread to prevent
synchronizing on each aggregate() call. In the end of superstep,
values from each of these will be aggregated back to WorkerThreadGlobalCommUsage| Constructor and Description |
|---|
ThreadLocalWorkerGlobalCommUsage()
Constructor
Creates new instances of all reducers from
WorkerAggregatorHandler |
| Modifier and Type | Method and Description |
|---|---|
void |
finishThreadComputation()
Call this after thread's computation is finished,
i.e.
|
<B extends org.apache.hadoop.io.Writable> |
getBroadcast(String name)
Get value broadcasted from master
|
void |
reduce(String name,
Object value)
Reduce given value.
|
void |
reduceMerge(String name,
org.apache.hadoop.io.Writable value)
Reduce given partial value.
|
public ThreadLocalWorkerGlobalCommUsage()
WorkerAggregatorHandlerpublic void reduce(String name, Object value)
WorkerReduceUsagereduce in interface WorkerReduceUsagename - Name of the reducervalue - Single value to reducepublic void reduceMerge(String name, org.apache.hadoop.io.Writable value)
WorkerReduceUsagereduceMerge in interface WorkerReduceUsagename - Name of the reducervalue - Single value to reducepublic <B extends org.apache.hadoop.io.Writable> B getBroadcast(String name)
WorkerBroadcastUsagegetBroadcast in interface WorkerBroadcastUsageB - Broadcast value typename - Name of the broadcasted valuepublic void finishThreadComputation()
WorkerThreadGlobalCommUsagefinishThreadComputation in interface WorkerThreadGlobalCommUsageCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.