void updateStorageUsage(String clustername, String hostname, int partitionId, short accountId, short containerId,
      long storageUsage) throws SQLException {
    // TODO: adding real physical storage usage and number of blobs here
    final long physicalStorageUsage = storageUsage;
    final long numberOfBlobs = 1L;
    try (Connection connection = dataSource.getConnection()) {
      try (PreparedStatement insertStatement = connection.prepareStatement(insertSql)) {
        long startTimeMs = System.currentTimeMillis();
        insertStatement.setString(1, clustername);
        insertStatement.setString(2, hostname);
        // The data type of partition id, account id and container id are not SMALLINT, but INT in MySQL, for
        // future extension
        insertStatement.setInt(3, partitionId);
        insertStatement.setInt(4, accountId);
        insertStatement.setInt(5, containerId);
        insertStatement.setLong(6, storageUsage);
        insertStatement.setLong(7, physicalStorageUsage);
        insertStatement.setLong(8, numberOfBlobs);
        insertStatement.setLong(9, storageUsage);
        insertStatement.setLong(10, physicalStorageUsage);
        insertStatement.setLong(11, numberOfBlobs);
        insertStatement.executeUpdate();
        metrics.writeTimeMs.update(System.currentTimeMillis() - startTimeMs);
        metrics.writeSuccessCount.inc();
      }
    } catch (SQLException e) {
      metrics.writeFailureCount.inc();
      logger.error(String.format("Failed to execute updated on %s, with parameter %d %d %d %d", ACCOUNT_REPORTS_TABLE,
          partitionId, accountId, containerId, storageUsage), e);
      throw e;
    }
  }
Update the storage usage for the given account/container.
@param clustername the name of target cluster
@param hostname the name of target host
@param partitionId The partition id of this account/container usage.
@param accountId The account id.
@param containerId The container id.
@param storageUsage The storage usage in bytes.
ambry-mysql/src/main/java/com/github/ambry/accountstats/AccountReportsDao.java