[ 
https://issues.apache.org/jira/browse/NIFI-1464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15138377#comment-15138377
 ] 

ASF GitHub Bot commented on NIFI-1464:
--------------------------------------

GitHub user olegz opened a pull request:

    https://github.com/apache/nifi/pull/210

    NIFI-1464, NIFI-78, NIFI-1487 Refactored Processor's life-cycle opera…

    …tion sequence
    
    * Simplified and cleaned StandardProcessScheduler.start/stopProcessor 
methods
    * Added stop/start operations to ProcessorNode.
    * Removed unnecessary synchronization blocks related to ScheduledState in 
favor of enforcing order and idempotency via CAS operations. Those 
synchronization blocks were causing intermittent deadlocks whenever 
@OnScheduled blocks indefinitely.
    * Added support for stopping the service when @OnScheduled operation hangs.
    * Fixed the order of life-cycle operation invocation ensuring that each 
operation can *only* be invoked at the appropriate time
    * Removed unnecessary locks from StandardProcessNode since Atomic variables 
are used.
    * Removed calls to @OnStopped from ContinuallyRunningProcessTask while 
ensuring that procesor's full shut down in implementation of 
StandardProcessorNode.stop() method.
    * Removed dead code
    * Added comprehensive tests suite that covers 95% of Processor's life-cycle 
operations within the scope of FlowController, StandardProcesssScheduler and 
StandardProcessNode
    * Improved and added javadocs on covered operations with detailed 
explanations.
    
    polishing

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/olegz/nifi NIFI-1464

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/210.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #210
    
----
commit aee48bfce95688f8fc0b0851efa75ce91937cff5
Author: Oleg Zhurakousky <[email protected]>
Date:   2016-02-04T21:23:45Z

    NIFI-1464, NIFI-78, NIFI-1487 Refactored Processor's life-cycle operation 
sequence
    * Simplified and cleaned StandardProcessScheduler.start/stopProcessor 
methods
    * Added stop/start operations to ProcessorNode.
    * Removed unnecessary synchronization blocks related to ScheduledState in 
favor of enforcing order and idempotency via CAS operations. Those 
synchronization blocks were causing intermittent deadlocks whenever 
@OnScheduled blocks indefinitely.
    * Added support for stopping the service when @OnScheduled operation hangs.
    * Fixed the order of life-cycle operation invocation ensuring that each 
operation can *only* be invoked at the appropriate time
    * Removed unnecessary locks from StandardProcessNode since Atomic variables 
are used.
    * Removed calls to @OnStopped from ContinuallyRunningProcessTask while 
ensuring that procesor's full shut down in implementation of 
StandardProcessorNode.stop() method.
    * Removed dead code
    * Added comprehensive tests suite that covers 95% of Processor's life-cycle 
operations within the scope of FlowController, StandardProcesssScheduler and 
StandardProcessNode
    * Improved and added javadocs on covered operations with detailed 
explanations.
    
    polishing

----


> 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)

Reply via email to