static boolean uploadBlobWithRetry(BlobId blobId, long blobSize, CloudBlobMetadata cloudBlobMetadata,
      InputStream inputStream, CloudRequestAgent cloudRequestAgent, AzureCloudDestination azureDest)
      throws CloudStorageException {
    return cloudRequestAgent.doWithRetries(() -> azureDest.uploadBlob(blobId, blobSize, cloudBlobMetadata, inputStream),
        "UploadBlob", blobId.getPartition().toPathString());
  }
Upload blob. Retry with appropriate throttling if required.
Upload blob to the cloud destination.
@param blobId id of the Ambry blob
@param blobSize the length of the input stream, if known, -1 if unknown.
@param cloudBlobMetadata the {@link CloudBlobMetadata} for the blob being uploaded.
@param inputStream the stream to read blob data
@param cloudRequestAgent {@link CloudRequestAgent} object.
@param azureDest {@link AzureCloudDestination} object.
@return flag indicating whether the blob was uploaded
@throws CloudStorageException if the upload encounters an error.
ambry-cloud/src/test/java/com/github/ambry/cloud/azure/AzureTestUtils.java