You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ex...@apache.org on 2023/03/07 21:32:41 UTC

[nifi] branch main updated: NIFI-11256 Improved documentation for Azure Event Hubs Processors

This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 5088934b79 NIFI-11256 Improved documentation for Azure Event Hubs Processors
5088934b79 is described below

commit 5088934b79e39e4180464186020dc62a0240df37
Author: Peter Turcsanyi <tu...@apache.org>
AuthorDate: Tue Mar 7 16:15:27 2023 +0100

    NIFI-11256 Improved documentation for Azure Event Hubs Processors
    
    - used the same ordering of 'Event Hub Namespace', 'Event Hub Name' and 'Service Bus Endpoint' properties
    - removed "Primary" tag from 'Shared Access Policy Key' property name
    - added some notes on clustering and consumer group in the documentation
    
    This closes #7018
    
    Signed-off-by: David Handermann <ex...@apache.org>
---
 .../apache/nifi/processors/azure/eventhub/ConsumeAzureEventHub.java   | 4 +++-
 .../org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java   | 4 +++-
 .../org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java   | 2 +-
 .../nifi/processors/azure/eventhub/utils/AzureEventHubUtils.java      | 3 ++-
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/ConsumeAzureEventHub.java b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/ConsumeAzureEventHub.java
index dedd4ae09b..485928eb8b 100644
--- a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/ConsumeAzureEventHub.java
+++ b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/ConsumeAzureEventHub.java
@@ -88,7 +88,9 @@ import static org.apache.commons.lang3.StringUtils.defaultIfBlank;
 @Tags({"azure", "microsoft", "cloud", "eventhub", "events", "streaming", "streams"})
 @CapabilityDescription("Receives messages from Microsoft Azure Event Hubs with checkpointing to ensure consistent event processing. "
         + "Checkpoint tracking avoids consuming a message multiple times and enables reliable resumption of processing in the event of intermittent network failures. "
-        + "Checkpoint tracking requires external storage and provides the preferred approach to consuming messages from Azure Event Hubs.")
+        + "Checkpoint tracking requires external storage and provides the preferred approach to consuming messages from Azure Event Hubs. "
+        + "In clustered environment, ConsumeAzureEventHub processor instances form a consumer group and the messages are distributed among the cluster nodes "
+        + "(each message is processed on one cluster node only).")
 @InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN)
 @TriggerSerially
 @WritesAttributes({
diff --git a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java
index 747db6c11a..d9f00839d3 100644
--- a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java
+++ b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java
@@ -66,6 +66,8 @@ import org.apache.nifi.processors.azure.eventhub.utils.AzureEventHubUtils;
 
 @Tags({"azure", "microsoft", "cloud", "eventhub", "events", "streaming", "streams"})
 @CapabilityDescription("Receives messages from Microsoft Azure Event Hubs without reliable checkpoint tracking. "
+        + "In clustered environment, GetAzureEventHub processor instances work independently and all cluster nodes process all messages "
+        + "(unless running the processor in Primary Only mode). "
         + "ConsumeAzureEventHub offers the recommended approach to receiving messages from Azure Event Hubs. "
         + "This processor creates a thread pool for connections to Azure Event Hubs.")
 @InputRequirement(Requirement.INPUT_FORBIDDEN)
@@ -161,9 +163,9 @@ public class GetAzureEventHub extends AbstractProcessor {
 
     static {
         propertyDescriptors = Collections.unmodifiableList(Arrays.asList(
+                NAMESPACE,
                 EVENT_HUB_NAME,
                 SERVICE_BUS_ENDPOINT,
-                NAMESPACE,
                 ACCESS_POLICY,
                 POLICY_PRIMARY_KEY,
                 USE_MANAGED_IDENTITY,
diff --git a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java
index 83e80f7235..389bb20cb9 100644
--- a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java
+++ b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java
@@ -124,8 +124,8 @@ public class PutAzureEventHub extends AbstractProcessor {
 
     static {
         final List<PropertyDescriptor> configuredDescriptors = new ArrayList<>();
-        configuredDescriptors.add(EVENT_HUB_NAME);
         configuredDescriptors.add(NAMESPACE);
+        configuredDescriptors.add(EVENT_HUB_NAME);
         configuredDescriptors.add(SERVICE_BUS_ENDPOINT);
         configuredDescriptors.add(ACCESS_POLICY);
         configuredDescriptors.add(POLICY_PRIMARY_KEY);
diff --git a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/utils/AzureEventHubUtils.java b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/utils/AzureEventHubUtils.java
index 6169178f5e..3cb4e78909 100644
--- a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/utils/AzureEventHubUtils.java
+++ b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/utils/AzureEventHubUtils.java
@@ -37,7 +37,8 @@ public final class AzureEventHubUtils {
 
     public static final PropertyDescriptor POLICY_PRIMARY_KEY = new PropertyDescriptor.Builder()
         .name("Shared Access Policy Primary Key")
-        .description("The primary key of the shared access policy")
+        .displayName("Shared Access Policy Key")
+        .description("The key of the shared access policy. Either the primary or the secondary key can be used.")
         .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
         .expressionLanguageSupported(ExpressionLanguageScope.NONE)
         .sensitive(true)