You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by pv...@apache.org on 2020/05/09 13:37:34 UTC
[nifi] branch master updated: NIFI-6913: PutAzureBlobStorage
processor will create container if not exists
This is an automated email from the ASF dual-hosted git repository.
pvillard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/master by this push:
new 851359c NIFI-6913: PutAzureBlobStorage processor will create container if not exists
851359c is described below
commit 851359c1fc09f65661ae236660b5ebcb655d9e67
Author: Sushil Kumar <su...@microsoft.com>
AuthorDate: Mon Apr 27 16:44:55 2020 -0700
NIFI-6913: PutAzureBlobStorage processor will create container if not exists
Signed-off-by: Pierre Villard <pi...@gmail.com>
This closes #4237.
---
.../org/apache/nifi/processors/azure/storage/PutAzureBlobStorage.java | 1 +
.../apache/nifi/processors/azure/storage/utils/AzureStorageUtils.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage.java b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage.java
index f42e4b3..0a3bc25 100644
--- a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage.java
+++ b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage.java
@@ -75,6 +75,7 @@ public class PutAzureBlobStorage extends AbstractAzureBlobProcessor {
try {
CloudBlobClient blobClient = AzureStorageUtils.createCloudBlobClient(context, getLogger(), flowFile);
CloudBlobContainer container = blobClient.getContainerReference(containerName);
+ container.createIfNotExists();
CloudBlob blob = container.getBlockBlobReference(blobPath);
diff --git a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/AzureStorageUtils.java b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/AzureStorageUtils.java
index 0e1dfd2..bae7209 100644
--- a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/AzureStorageUtils.java
+++ b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/AzureStorageUtils.java
@@ -88,7 +88,7 @@ public final class AzureStorageUtils {
public static final PropertyDescriptor CONTAINER = new PropertyDescriptor.Builder()
.name("container-name")
.displayName("Container Name")
- .description("Name of the Azure storage container")
+ .description("Name of the Azure storage container. In case of PutAzureBlobStorage processor, container will be created if it does not exist.")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.required(true)