public synchronized long getSize() {
    return byteArrayOutputStream.isPresent() ? byteArrayOutputStream.get().size() + totalUploadedBlockSize : totalUploadedBlockSize;
  }
Returns the size of the blob so far including data in the uploaded blocks and data currently in buffer.
@return data written since the beginning
samza-azure/src/main/java/org/apache/samza/system/azureblob/avro/AzureBlobOutputStream.java