public void updateDatasetVersionState(int accountId, int containerId, String accountName,
      String containerName, String datasetName, String version, DatasetVersionState datasetVersionState)
      throws SQLException, AccountServiceException {
    long startTimeMs = System.currentTimeMillis();
    try {
      Dataset dataset = getDatasetHelper(accountId, containerId, accountName, containerName, datasetName, true);
      long versionNumber = getVersionBasedOnSchema(version, dataset.getVersionSchema());
      PreparedStatement updateDatasetVersionStateStatement =
          dataAccessor.getPreparedStatement(updateDatasetVersionStateSql, true);
      executeUpdateDatasetVersionStateStatement(updateDatasetVersionStateStatement, accountId, containerId,
          dataset.getDatasetName(), versionNumber, datasetVersionState);
      dataAccessor.onSuccess(Write, System.currentTimeMillis() - startTimeMs);
    } catch (SQLException | AccountServiceException e) {
      dataAccessor.onException(e, Write);
      throw e;
    }
  }
Update the dataset version state.
@param accountId the id for the parent account.
@param containerId the id of the container.
@param accountName the name for the parent account.
@param containerName the name for the container.
@param datasetName the name of the dataset.
@param version the version of the dataset.
@param datasetVersionState the {@link DatasetVersionState}
@throws SQLException
@throws AccountServiceException
ambry-account/src/main/java/com/github/ambry/account/mysql/DatasetDao.java