[
https://issues.apache.org/jira/browse/NIFI-1464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15136437#comment-15136437
]
Oleg Zhurakousky commented on NIFI-1464:
----------------------------------------
Another note to self:
Processor's @OnStopped methods are invoked from two different places which
makes it hard to track/debug/maintain etc. It happens in
_ContinuallyRunProcessorTask_ and _StandardProcessScheduler_. Based on the
refactoring in progress it appears that this could be improved by initiating an
async loop inside of _StandardProcessScheduler.stopProcessor()_ operation to
check if there are any active threads and invoke _@OnStopped_ when it's 0.
Also, it would allow for a timeout to be applied as to how long to wait for a
Processor to finish until killing it which speaks directly to NIFI-78.
> Refactor lifecycle code for Processors and other components
> -----------------------------------------------------------
>
> Key: NIFI-1464
> URL: https://issues.apache.org/jira/browse/NIFI-1464
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Oleg Zhurakousky
> Assignee: Oleg Zhurakousky
> Fix For: 0.6.0
>
>
> Similar lifecycle handling improvements that went in as part of the NIFI-1164
> for ControllerServices, could/should be applied to other components (e..g,
> Processors).
> The improvements may also help to address NIFI-78 (may be without killing the
> thread).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)