Interface GlobalAggregateManager
-
- All Known Implementing Classes:
RpcGlobalAggregateManager
public interface GlobalAggregateManager
This interface gives access to transient, named, global aggregates. This can be used to share state amongst parallel tasks in a job. It is not designed for high throughput updates and the aggregates do NOT survive a job failure. Each call to the updateGlobalAggregate() method results in serialized RPC communication with the JobMaster so use with care.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <IN,ACC,OUT>
OUTupdateGlobalAggregate(String aggregateName, Object aggregand, AggregateFunction<IN,ACC,OUT> aggregateFunction)
Update the global aggregate and return the new value.
-
-
-
Method Detail
-
updateGlobalAggregate
<IN,ACC,OUT> OUT updateGlobalAggregate(String aggregateName, Object aggregand, AggregateFunction<IN,ACC,OUT> aggregateFunction) throws IOException
Update the global aggregate and return the new value.- Parameters:
aggregateName
- The name of the aggregate to updateaggregand
- The value to add to the aggregateaggregateFunction
- The function to apply to the current aggregate and aggregand to obtain the new aggregate value- Returns:
- The updated aggregate
- Throws:
IOException
-
-