public static DatasetVersionRecord getDatasetVersionHelper(RestRequest restRequest, String datasetVersionPathString, AccountService accountService, FrontendMetrics metrics) throws RestServiceException {
    DatasetVersionPath datasetVersionPath = DatasetVersionPath.parse(datasetVersionPathString, restRequest.getArgs());
    String accountName = datasetVersionPath.getAccountName();
    String containerName = datasetVersionPath.getContainerName();
    String datasetName = datasetVersionPath.getDatasetName();
    String version = datasetVersionPath.getVersion();
    try {
      return accountService.getDatasetVersion(accountName, containerName, datasetName, version);
    } catch (AccountServiceException ex) {
      LOGGER.error("Dataset version get failed for accountName: " + accountName + " containerName: " + containerName
          + " datasetName: " + datasetName + " version: " + version, ex);
      metrics.getDatasetVersionError.inc();
      throw new RestServiceException(ex.getMessage(),
          RestServiceErrorCode.getRestServiceErrorCode(ex.getErrorCode()));
    }
  }
Refresh the OperationOrBlobId in request path with the specific latest version info.
@param restRequest the {@link RestRequest}
@param datasetVersionRecord the {@link DatasetVersionRecord} which include the version info.
@throws RestServiceException
ambry-frontend/src/main/java/com/github/ambry/frontend/FrontendUtils.java