private void closeDataFileWriter(DataFileWriter dataFileWriter, AzureBlobOutputStream azureBlobOutputStream,
      BlockBlobAsyncClient blockBlobAsyncClient) throws IOException {
    try {
      LOG.info("Closing the blob: {}", blockBlobAsyncClient.getBlobUrl().toString());
      // dataFileWriter.close calls close of the azureBlobOutputStream associated with it.
      dataFileWriter.close();
    } catch (Exception e) {
      LOG.error("Exception occurred during DataFileWriter.close for blob  "
          + blockBlobAsyncClient.getBlobUrl()
          + ". All blocks uploaded so far for this blob will be discarded to avoid invalid blobs.");
      throw e;
    }
  }
This method closes all DataFileWriters and output streams associated with all the blobs created.
flush should be explicitly called before close.
{@inheritDoc}
@throws IllegalStateException when closing a closed writer
@throws SamzaException if underlying DataFileWriter.close fails
samza-azure/src/main/java/org/apache/samza/system/azureblob/avro/AzureBlobAvroWriter.java