You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "Matt Brown (JIRA)" <ji...@apache.org> on 2016/04/13 23:35:25 UTC

[jira] [Updated] (NIFI-1766) AbstractPutEventProcessor - the sender pool object and sender objects are recreated before and after every call to OnTrigger() respectively.

     [ https://issues.apache.org/jira/browse/NIFI-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Brown updated NIFI-1766:
-----------------------------
    Attachment: 0001-NIFI-1766.patch

Uploaded suggested patch (0001-NIFI-1766.patch).
- Sender Pool object creation is moved into the init() method.
- Closing of sender objects is performed at shutdown (@OnShutdown) rather than on stopped (@OnStopped).

The senders are now reused between OnTrigger() calls in Processors that inherit from AbstractPutEventProcessor. This means that for TCP senders, the same TCP connection is maintained and the FlowFiles are all sent down the single connection.

> AbstractPutEventProcessor - the sender pool object and sender objects are recreated before and after every call to OnTrigger() respectively.
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-1766
>                 URL: https://issues.apache.org/jira/browse/NIFI-1766
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 0.6.0
>            Reporter: Matt Brown
>            Priority: Minor
>         Attachments: 0001-NIFI-1766.patch
>
>
> AbstractPutEventProcessor creates the sender pool list object in the OnScheduled() method which is annotated with @OnScheduled. This method therefore gets called before every OnTrigger() call. The sender pool is therefore being recreated for every single FlowFile that is handled by OnTrigger(). Is this the correct behaviour? I was expecting the pool to be created once for the lifetime of the Processor instance.
> Similarly, the sender objects within the sender pool are being closed down by the closeSenders() method which is annotated with @OnStopped. This method therefore gets called after each OnTrigger() call has completed. The senders are therefore being deleted after every OnTrigger() call (and then recreated in the next OnTrigger() call). Is this the intended behaviour? For TCP senders, this means that each FlowFIle is sent over a new TCP connection. I was expecting all FlowFiles to be sent out over the same TCP connection.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)