private void updateTtlForDatasetVersion() throws RestServiceException {
      long startUpdateTtlDatasetVersionTime = System.currentTimeMillis();
      String datasetVersionPathString = RestUtils.getHeader(restRequest.getArgs(), RestUtils.Headers.BLOB_ID, true);
      DatasetVersionPath datasetVersionPath = DatasetVersionPath.parse(datasetVersionPathString, restRequest.getArgs());
      String accountName = datasetVersionPath.getAccountName();
      String containerName = datasetVersionPath.getContainerName();
      String datasetName = datasetVersionPath.getDatasetName();
      String version = datasetVersionPath.getVersion();
      try {
        accountService.updateDatasetVersionTtl(accountName, containerName, datasetName, version);
        metrics.updateTtlDatasetVersionProcessingTimeInMs.update(
            System.currentTimeMillis() - startUpdateTtlDatasetVersionTime);
      } catch (AccountServiceException ex) {
        LOGGER.error(
            "Dataset version update failed for accountName: " + accountName + " containerName: " + containerName
                + " datasetName: " + datasetName + " version: " + version, ex);
        metrics.ttlUpdateDatasetVersionError.inc();
        throw new RestServiceException(ex.getMessage(),
            RestServiceErrorCode.getRestServiceErrorCode(ex.getErrorCode()));
      }
    }
Support ttl update for dataset version.
@throws RestServiceException
ambry-frontend/src/main/java/com/github/ambry/frontend/TtlUpdateHandler.java