You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Marton Szasz (Jira)" <ji...@apache.org> on 2023/08/30 14:22:00 UTC
[jira] [Reopened] (MINIFICPP-1076) onTrigger always runs after a yield, regardless of the run schedule
[ https://issues.apache.org/jira/browse/MINIFICPP-1076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marton Szasz reopened MINIFICPP-1076:
-------------------------------------
Reopening, because after some discussion, it's not as clear as it first seemed.
> onTrigger always runs after a yield, regardless of the run schedule
> -------------------------------------------------------------------
>
> Key: MINIFICPP-1076
> URL: https://issues.apache.org/jira/browse/MINIFICPP-1076
> Project: Apache NiFi MiNiFi C++
> Issue Type: Bug
> Affects Versions: 0.6.0
> Reporter: Andre Araujo
> Priority: Major
>
> I'm running some tests with Minifi (C++) and noticed something strange that doesn't seem right to me.
> I created a test processor that generates a single flow file every time {{onTrigger}} is executed (pretty much like {{GenerateFlowFile}}). I ran this processor on NiFi and, as I expected, I got 1 flow file at every {{Run Schedule}} period.
> I tested calling {{context.yield()}} within {{onTrigger}} and noticed that it makes no difference; {{onTrigger}} is always called once per scheduling period.
> I wrote the same test processor for Minifi C++ and the result was different. If I *don't* call {{context->yield()}} in {{onTrigger}}, the behavior is the same as in NiFi. However, if I call {{context->yield()}} in {{onTrigger}}, {{onTrigger}} will be invoked again at the end of the yielding period, regardless of the run schedule.
> If, for example, *Run Schedule = 60 secs* and *Yield Duration = 1 sec*, I'll get 60 flow files per minute.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)