You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ns...@apache.org on 2023/08/24 14:08:20 UTC
[nifi] branch support/nifi-1.x updated: NIFI-11987: Set read buffer size in PutAzureBlobStorage_v12
This is an automated email from the ASF dual-hosted git repository.
nsabonyi pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
new 6cad69d5e1 NIFI-11987: Set read buffer size in PutAzureBlobStorage_v12
6cad69d5e1 is described below
commit 6cad69d5e1ccc393dbebe800767387768abdb04e
Author: Peter Turcsanyi <tu...@apache.org>
AuthorDate: Thu Aug 24 00:10:10 2023 +0200
NIFI-11987: Set read buffer size in PutAzureBlobStorage_v12
Increased the read buffer size in order to avoid OOME due to too many buffer allocations (exceeding vm.max_map_count on Linux).
Backported
This closes #7640
Signed-off-by: Nandor Soma Abonyi <ns...@apache.org>
(cherry picked from commit 68983cef42d5212a7023e6cf907c8cb704f0c76d)
---
.../apache/nifi/processors/azure/storage/PutAzureBlobStorage_v12.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage_v12.java b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage_v12.java
index 2e7e8bd80d..f005800873 100644
--- a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage_v12.java
+++ b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage_v12.java
@@ -199,7 +199,7 @@ public class PutAzureBlobStorage_v12 extends AbstractAzureBlobProcessor_v12 impl
.map(FileResource::getInputStream)
.orElseGet(() -> session.read(sourceFlowFile))
) {
- final BlobParallelUploadOptions blobParallelUploadOptions = new BlobParallelUploadOptions(toFluxByteBuffer(sourceInputStream));
+ final BlobParallelUploadOptions blobParallelUploadOptions = new BlobParallelUploadOptions(toFluxByteBuffer(sourceInputStream, BlobClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE));
blobParallelUploadOptions.setRequestConditions(blobRequestConditions);
Response<BlockBlobItem> response = blobClient.uploadWithResponse(blobParallelUploadOptions, null, Context.NONE);
BlockBlobItem blob = response.getValue();