Skip to content

gracefullShutdown: wait for queues to empty before undeploying#29

Open
ghost wants to merge 1 commit into
masterfrom
unknown repository
Open

gracefullShutdown: wait for queues to empty before undeploying#29
ghost wants to merge 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented May 19, 2016

Copy link
Copy Markdown

This change allows the deployment of a template to be dependable on the status of the queues. If gracefullShutdown is set to true it will wait for all queues to become empty before continuing with the undeployment.

Here's the flow of the handleGracefullShutdown() function:

  • find all processors that are only listed as source and not as destination
  • stop the found processors. This should stop the input from external systems into the NiFi flow.
  • wait for a maximum amount of time for all queues to empty.
  • with all queues empty the undeploy and import of the template can continue.

This change allows the deployment of a template to be dependable on the status of the queues. If gracefullShutdown is set to true it will wait for all queues to become empty before continuing with the undeployment.

Here's the flow of the gracefullShutdown() function:
- find all processors that are only listed as source and not as destination
- stop the found processors. This should stop the input from external systems into the NiFi flow.
- wait for a maximum amount of time for all queues to empty.
- with all queues empty the undeploy and import of the template can continue.
Comment thread NiFiDeploy.groovy
)
assert resp.status == 200
processors = resp.data.processors
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

} should be outside of processors loop to get all processors in the map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant