You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Andre Araujo (Jira)" <ji...@apache.org> on 2019/10/31 18:02:00 UTC
[jira] [Created] (MINIFICPP-1076) onTrigger always runs after a
yield, regardless of the run schedule
Andre Araujo created MINIFICPP-1076:
---------------------------------------
Summary: 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
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.3.4#803005)