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 2017/06/29 07:30:46 UTC

nifi git commit: NIFI-4007 - Update azure EventHubs client to latest version

Repository: nifi
Updated Branches:
  refs/heads/master bdfd71069 -> 82ef67195


NIFI-4007 - Update azure EventHubs client to latest version

Signed-off-by: Pierre Villard <pi...@gmail.com>

This closes #1880.


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/82ef6719
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/82ef6719
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/82ef6719

Branch: refs/heads/master
Commit: 82ef671953a726bae2d4529df03f29fad401fb26
Parents: bdfd710
Author: Sreeram Garlapati <Sr...@Sree.guest.corp.microsoft.com>
Authored: Thu Jun 1 16:34:55 2017 -0700
Committer: Pierre Villard <pi...@gmail.com>
Committed: Thu Jun 29 09:30:39 2017 +0200

----------------------------------------------------------------------
 .../nifi-azure-bundle/nifi-azure-processors/pom.xml      |  7 +------
 .../nifi/processors/azure/eventhub/GetAzureEventHub.java | 11 +++++------
 2 files changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/82ef6719/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/pom.xml
----------------------------------------------------------------------
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 79198f0..cf0e737 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 @@
         <dependency>
             <groupId>com.microsoft.azure</groupId>
             <artifactId>azure-eventhubs</artifactId>
-            <version>0.9.0</version>
+            <version>0.14.2</version>
         </dependency>
-        <!--<dependency>
-            <groupId>com.microsoft.eventhubs.client</groupId>
-            <artifactId>eventhubs-client</artifactId>
-            <version>0.9.1</version>
-        </dependency>-->
         <dependency>
             <groupId>com.microsoft.azure</groupId>
             <artifactId>azure-storage</artifactId>

http://git-wip-us.apache.org/repos/asf/nifi/blob/82ef6719/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java
----------------------------------------------------------------------
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 69d5586..c40707e 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 class GetAzureEventHub extends AbstractProcessor {
 
                     final Map<String, String> 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 class GetAzureEventHub extends AbstractProcessor {
 
                     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();