Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-1452

Yield Duration can short circuit long Timer Driven Run Schedule

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 0.4.1
    • 1.3.0
    • Core Framework
    • None

    Description

      This may be a rare use case, but I configured a GetFile processor to be Timer Driven with a Run Schedule of 30 secs. Its Yield Duration was default 1 sec. I expected GetFile onTrigger() to be called every 30 secs, but it was being called every 1 sec most of the time.

      GetFile will call context.yield() when it polls a directory and gets an empty list in return. It appears that a yield will ignore the Run Schedule. Many standard processors call context.yield() when they have no work to do.

      I changed my scheduling strategy to CRON Driven with its run schedule every 30 seconds, and the onTrigger() was called every 30 seconds, even after a yield. So CRON Driven scheduling is working as expected after a yield.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mosermw Michael W Moser
            mosermw Michael W Moser
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment