private void createContainerIfNotExists(BlobContainerAsyncClient containerClient) {
    try {
      containerClient.create().block();
    } catch (BlobStorageException e) {
      //StorageErrorCode defines constants corresponding to all error codes returned by the service.
      if (e.getErrorCode() == BlobErrorCode.RESOURCE_NOT_FOUND) {
        HttpResponse response = e.getResponse();
        LOG.error("Error creating the container url " + containerClient.getBlobContainerUrl().toString() + " with status code: " + response.getStatusCode(), e);
      } else if (e.getErrorCode() == BlobErrorCode.CONTAINER_BEING_DELETED) {
        LOG.error("Container is being deleted. Container URL is: " + containerClient.getBlobContainerUrl().toString(), e);
      } else if (e.getErrorCode() == BlobErrorCode.CONTAINER_ALREADY_EXISTS) {
        return;
      }
      throw e;
    }
  }
// find the writer in the writerMap else create one
@param source for which to find/create the writer
@param messageEnvelope to fetch the schema from if writer needs to be created
@return an AzureBlobWriter object
samza-azure/src/main/java/org/apache/samza/system/azureblob/producer/AzureBlobSystemProducer.java