@Override
  public Pair<String, HostAccountStorageStatsWrapper> next() {
    String hostname = instances.next();
    try {
      Pair<String, Integer> hostNameAndPort = TaskUtils.getHostNameAndPort(hostname, clusterMapConfig.clusterMapPort);
      return new Pair<>(hostname,
          accountStatsStore.queryHostAccountStorageStatsByHost(hostNameAndPort.getFirst(), hostNameAndPort.getSecond()));
    } catch (Exception e) {
      logger.error("Failed to get account storage stats for {}", hostname);
      throw new RuntimeException(e);
    }
  }
This is an iterator for account storage stats fetched from MySQL
ambry-clustermap/src/main/java/com/github/ambry/clustermap/AccountStorageStatsIterator.java