@Override
  public void storeAggregatedAccountStorageStats(AggregatedAccountStorageStats aggregatedAccountStorageStats)
      throws SQLException {
    int batchSize = 0;
    long startTimeMs = System.currentTimeMillis();
    AggregatedAccountReportsDao.AggregatedStorageBatchUpdater batch =
        aggregatedAccountReportsDao.new AggregatedStorageBatchUpdater(config.updateBatchSize);
    for (Map.Entry<Short, Map<Short, ContainerStorageStats>> accountMapEntry : aggregatedAccountStorageStats.getStorageStats()
        .entrySet()) {
      short accountId = accountMapEntry.getKey();
      Map<Short, ContainerStorageStats> containerMap = accountMapEntry.getValue();
      for (Map.Entry<Short, ContainerStorageStats> containerMapEntry : containerMap.entrySet()) {
        batch.addUpdateToBatch(clusterName, accountId, containerMapEntry.getValue());
        batchSize++;
      }
    }
    batch.flush();
    storeMetrics.aggregatedPublishTimeMs.update(System.currentTimeMillis() - startTimeMs);
    storeMetrics.aggregatedBatchSize.update(batchSize);
  }
Store the {@link AggregatedAccountStorageStats} to mysql database.
@param aggregatedAccountStorageStats The {@link AggregatedAccountStorageStats}.
ambry-mysql/src/main/java/com/github/ambry/accountstats/AccountStatsMySqlStore.java