CompletableFuture<CloudBlobMetadata> getMetadataOrNullAsync(BlobId blobId) {
    Timer.Context operationTimer = azureMetrics.documentReadTime.time();
    return cosmosAsyncContainer.readItem(blobId.getID(), new PartitionKey(blobId.getPartition().toPathString()),
        CloudBlobMetadata.class).toFuture().handle((response, throwable) -> {
      operationTimer.stop();
      if (throwable != null) {
        Exception ex = Utils.extractFutureExceptionCause(throwable);
        if (ex instanceof CosmosException && ((CosmosException) ex).getStatusCode() == STATUS_NOT_FOUND) {
          return null;
        }
        throw throwable instanceof CompletionException ? (CompletionException) throwable : new CompletionException(ex);
      }
      return response.getItem();
    });
  }
Get the metadata record for a single blob asynchronously.
@param blobId the blob to read.
@return a {@link CompletableFuture} that will eventually contain the {@link CloudBlobMetadata} for the blob if
        it is found or otherwise null. If an error occurred, it will contain a {@link CosmosException}.
ambry-cloud/src/main/java/com/github/ambry/cloud/azure/CosmosDataAccessor.java