[GitHub] nifi pull request #676: Updating PutAzureEventHub processor so that it uses ...

2017-02-14 Thread apsaltis
Github user apsaltis closed the pull request at:

https://github.com/apache/nifi/pull/676


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi pull request #676: Updating PutAzureEventHub processor so that it uses ...

2016-11-17 Thread ijokarumawak
Github user ijokarumawak commented on a diff in the pull request:

https://github.com/apache/nifi/pull/676#discussion_r88591332
  
--- Diff: 
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java
 ---
@@ -161,25 +170,38 @@ public void onTrigger(final ProcessContext context, 
final ProcessSession session
 }
 
 final StopWatch stopWatch = new StopWatch(true);
-final byte[] buffer = new byte[(int) flowFile.getSize()];
-session.read(flowFile, in -> StreamUtils.fillBuffer(in, 
buffer));
+final Map attributes = new HashMap<>();
+final byte[] buffer = new byte[(int) flowFile.getSize()];
+session.read(flowFile, in -> StreamUtils.fillBuffer(in, buffer));
+
+final PropertyValue idPropertyValue = 
context.getProperty(PARTITION_KEY);
+
+final String partitionId = (null == idPropertyValue || 
!idPropertyValue.isSet()) ?
+UUID.randomUUID().toString() : idPropertyValue.getValue();
--- End diff --

Do we have to generate UUID here? Or should we let EventHub library handle 
that? How does the library determine partition if we doesn't pass any partition 
key to sendSync?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi pull request #676: Updating PutAzureEventHub processor so that it uses ...

2016-11-17 Thread ijokarumawak
Github user ijokarumawak commented on a diff in the pull request:

https://github.com/apache/nifi/pull/676#discussion_r88591375
  
--- Diff: 
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java
 ---
@@ -86,6 +86,13 @@
 .required(true)
 .build();
 
+static final PropertyDescriptor PARTITION_KEY = new 
PropertyDescriptor.Builder()
+.name("Partition ID for Event")
--- End diff --

Let's make the name consistent, this should be Partition KEY for Event, 
shouldn't it?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi pull request #676: Updating PutAzureEventHub processor so that it uses ...

2016-11-17 Thread ijokarumawak
Github user ijokarumawak commented on a diff in the pull request:

https://github.com/apache/nifi/pull/676#discussion_r88591409
  
--- Diff: 
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java
 ---
@@ -56,6 +55,7 @@
 @InputRequirement(Requirement.INPUT_REQUIRED)
 @CapabilityDescription("Sends the contents of a FlowFile to a Windows 
Azure Event Hub. Note: the content of the FlowFile will be buffered into memory 
before being sent, "
 + "so care should be taken to avoid sending FlowFiles to this 
Processor that exceed the amount of Java Heap Space available.")
+@WritesAttribute(attribute = "eventhub.partitionId", description = "The 
partitionId used for the message that was pulled")
--- End diff --

partitionKey?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi pull request #676: Updating PutAzureEventHub processor so that it uses ...

2016-07-19 Thread apsaltis
GitHub user apsaltis opened a pull request:

https://github.com/apache/nifi/pull/676

Updating PutAzureEventHub processor so that it uses a partition id an…

Updating PutAzureEventHub processor so that it uses a partition id and also 
emits that id as a flow attribute so it can be used downstream. 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apsaltis/nifi nifi-2275

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi/pull/676.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #676


commit 000a82271aa4acbc89f4f60259280d6933369213
Author: Andrew Psaltis 
Date:   2016-07-19T16:38:29Z

Updating PutAzureEventHub processor so that it uses a partition id and also 
emits that id as a flow attribute so it can be used down stream




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---