From c6425baa60e5d5178e0668c4fa152c2cd28f7459 Mon Sep 17 00:00:00 2001 From: Sreeram Garlapati Date: Thu, 1 Jun 2017 16:34:55 -0700 Subject: [PATCH 1/3] Update azure EventHubs client to latest version --- .../nifi-azure-bundle/nifi-azure-processors/pom.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/pom.xml b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/pom.xml index 43d181eb20b7..2db413eee182 100644 --- a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/pom.xml +++ b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/pom.xml @@ -31,13 +31,8 @@ com.microsoft.azure azure-eventhubs - 0.9.0 + 0.14.0 - com.microsoft.azure azure-storage From 913a4c2888086b03c4372a584497c96764929574 Mon Sep 17 00:00:00 2001 From: Sreeram Garlapati Date: Thu, 29 Jun 2017 02:27:28 +0530 Subject: [PATCH 2/3] fix usage of deprecated eventdata api --- .../processors/azure/eventhub/GetAzureEventHub.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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 69d558640bec..c40707e8f485 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 @@ -338,12 +338,12 @@ public void onTrigger(final ProcessContext context, final ProcessSession session final Map attributes = new HashMap<>(); FlowFile flowFile = session.create(); - EventData.SystemProperties systemProperties = eventData.getSystemProperties(); + final EventData.SystemProperties systemProperties = eventData.getSystemProperties(); if (null != systemProperties) { - attributes.put("eventhub.enqueued.timestamp", String.valueOf(eventData.getSystemProperties().getEnqueuedTime())); - attributes.put("eventhub.offset", eventData.getSystemProperties().getOffset()); - attributes.put("eventhub.sequence", String.valueOf(eventData.getSystemProperties().getSequenceNumber())); + attributes.put("eventhub.enqueued.timestamp", String.valueOf(systemProperties.getEnqueuedTime())); + attributes.put("eventhub.offset", systemProperties.getOffset()); + attributes.put("eventhub.sequence", String.valueOf(systemProperties.getSequenceNumber())); } attributes.put("eventhub.name", context.getProperty(EVENT_HUB_NAME).getValue()); @@ -352,10 +352,9 @@ public void onTrigger(final ProcessContext context, final ProcessSession session flowFile = session.putAllAttributes(flowFile, attributes); flowFile = session.write(flowFile, out -> { - out.write(eventData.getBody()); + out.write(eventData.getBytes()); }); - session.transfer(flowFile, REL_SUCCESS); final String namespace = context.getProperty(NAMESPACE).getValue(); From 13eb24071dd1dabbc6f46ea5176f240533a91615 Mon Sep 17 00:00:00 2001 From: Sreeram Garlapati Date: Thu, 29 Jun 2017 02:30:26 +0530 Subject: [PATCH 3/3] update pom to latest eventhubs client 0.14.2 --- .../nifi-azure-bundle/nifi-azure-processors/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/pom.xml b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/pom.xml index 70be8b5113a7..cf0e7373ba50 100644 --- a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/pom.xml +++ b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/pom.xml @@ -31,7 +31,7 @@ com.microsoft.azure azure-eventhubs - 0.14.0 + 0.14.2 com.microsoft.azure