@Override
  public <IN, ACC, OUT> OUT updateGlobalAggregate(
      String aggregateName, Object aggregand, AggregateFunction<IN, ACC, OUT> aggregateFunction)
      throws IOException {

    Object accumulator = accumulators.get(aggregateName);
    if (null == accumulator) {
      accumulator = aggregateFunction.createAccumulator();
    }

    accumulator = aggregateFunction.add((IN) aggregand, (ACC) accumulator);
    accumulators.put(aggregateName, accumulator);
    return aggregateFunction.getResult((ACC) accumulator);
  }
An util class of global aggregate manager that simulates action as {@link
RpcGlobalAggregateManager} in the jobMaster.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/test/java/org/apache/amoro/flink/util/TestGlobalAggregateManager.java