@Override
  public AccountStatsStore getAccountStatsStore() throws Exception {
    Map<String, List<DbEndpoint>> dcToMySqlDBEndpoints = getDbEndpointsPerDC(accountStatsMySqlConfig.dbInfo);
    List<DbEndpoint> dbEndpoints = dcToMySqlDBEndpoints.get(localDC);
    if (dbEndpoints == null || dbEndpoints.size() == 0) {
      throw new IllegalArgumentException("Empty db endpoints for datacenter: " + localDC);
    }
    dbEndpoints.forEach(ep -> logger.info("DBUrl: {}", ep.getUrl()));
    return new AccountStatsMySqlStore(accountStatsMySqlConfig, buildDataSource(dbEndpoints.get(0)), clusterName,
        hostname, hostnameHelper, registry);
  }
Return {@link AccountStatsMySqlStore}.
@return
@throws SQLException
ambry-mysql/src/main/java/com/github/ambry/accountstats/AccountStatsMySqlStoreFactory.java