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
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---