public synchronized Pair<S, Long> getAvgArgs() {
        return new Pair<>(sum, rowCount);
      }
It computes average while fetching sum and row count from all the corresponding regions.
Approach is to compute a global sum of region level sum and rowcount and then compute the
average.
@param table table to scan.
@param scan  the HBase scan object to use to read data from HBase
@throws Throwable The caller is supposed to handle the exception as they are thrown &amp;
                  propagated to it.
hbase-endpoint/src/main/java/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.java