public Container getContainerByIdHelper(short accountId, Short containerId) throws AccountServiceException {
    Account account = getAccountById(accountId);
    if (account == null) {
      return null;
    }
    Container container = account.getContainerById(containerId);
    if (container == null) {
      // If container is not present in the cache, query from mysql db
      try {
        container = mySqlAccountStore.getContainerById(accountId, containerId);
        if (container != null) {
          // write container to in-memory cache
          updateContainersInCache(Collections.singletonList(container));
          logger.info("Container Id {} in Account {} is not found locally, fetched from mysql db", containerId,
              account.getName());
          accountServiceMetrics.onDemandContainerFetchCount.inc();
        } else {
          logger.error("Container Id {} is not found in Account {}", containerId, account.getName());
          // Note: We are not using LRU cache for storing recent unsuccessful get attempts by container Ids since this
          // will be called in getBlob() path which should have valid account-container in most cases.
        }
      } catch (SQLException e) {
        throw translateSQLException(e);
      }
    }
    return container;
  }
Get an existing container from a given account.
@param accountId the name of account which container belongs to.
@param containerId the id of container to get.
@return the requested {@link Container} object or null if not present.
@throws AccountServiceException if exception occurs when getting container.
ambry-account/src/main/java/com/github/ambry/account/CachedAccountService.java