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

    Modifier and Type
    Method
    Description
    <IN, ACC, OUT>
    OUT
    updateGlobalAggregate(String aggregateName, Object aggregand, org.apache.flink.api.common.functions.AggregateFunction<IN,ACC,OUT> aggregateFunction)
    Update the global aggregate and return the new value.
  • Method Details

    • updateGlobalAggregate

      <IN, ACC, OUT> OUT updateGlobalAggregate(String aggregateName, Object aggregand, org.apache.flink.api.common.functions.AggregateFunction<IN,ACC,OUT> aggregateFunction) throws IOException
      Update the global aggregate and return the new value.
      Parameters:
      aggregateName - The name of the aggregate to update
      aggregand - The value to add to the aggregate
      aggregateFunction - The function to apply to the current aggregate and aggregand to obtain the new aggregate value
      Returns:
      The updated aggregate
      Throws:
      IOException