nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NIFI-2372) Allow ProcessSession to be passed to operations annotated with @OnUnscsheduled
Date Tue, 06 Sep 2016 06:19:21 GMT

    [ https://issues.apache.org/jira/browse/NIFI-2372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15466566#comment-15466566
] 

ASF GitHub Bot commented on NIFI-2372:
--------------------------------------

GitHub user joewitt opened a pull request:

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

    NIFI-2372 ensure session and consumer aligned and has registered reba…

    …lance listener. Make consumption far more memory and process efficient.

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

    $ git pull https://github.com/joewitt/incubator-nifi NIFI-2732

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

    https://github.com/apache/nifi/pull/987.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 #987
    
----
commit 6cca1eed679e8b9e3dbc020fa4de589e4578df92
Author: joewitt <joewitt@apache.org>
Date:   2016-08-31T05:25:12Z

    NIFI-2372 ensure session and consumer aligned and has registered rebalance listener. Make
consumption far more memory and process efficient.

----


> Allow ProcessSession to be passed to operations annotated with @OnUnscsheduled
> ------------------------------------------------------------------------------
>
>                 Key: NIFI-2372
>                 URL: https://issues.apache.org/jira/browse/NIFI-2372
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>            Reporter: Oleg Zhurakousky
>            Assignee: Oleg Zhurakousky
>            Priority: Minor
>             Fix For: 1.1.0
>
>
> With adoption of NiFi there are more and more cases where Processors that source their
data from the external systems (e.g., Email, JMS, MQTT etc) may need to hold an internal queue
of data to be sent as content in individual FlowFiles. This implies somewhat of a persistent
*state* between subsequent invocation of the _onTriggered(..)_ operation. This creates a problem
for the processors that still have data in the internal data queue while being stopped. 
> While stoping of the processor is not a real issue (since the instance of the processor
is preserved), the subsequent stopping of NiFi that may follow is. 
> One of the way of dealing with it is to drain the internal data queue  before shitting
down processor, but that requires access to ProcessSession which is not currently supported
by NiFi to operations annotated with _@OnUnscheduled_, resulting in variety of workarounds
(e.g., have ProcessSession as instance variable of the Processor instance, etc.).



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

Mime
View raw message