commit | b95a82f4a516249f240075e3c402655be70106ca | [log] [tgz] |
---|---|---|
author | Mark Payne <markap14@hotmail.com> | Wed Mar 23 11:19:31 2016 -0400 |
committer | Mark Payne <markap14@hotmail.com> | Wed Mar 23 11:31:20 2016 -0400 |
tree | f0ac0ce388837522c495dc1fa853f1230c05ca52 | |
parent | 423b333b7128db987bac86c3104546468beea852 [diff] |
NIFI-1676: Do not allow Processor to be started if state is STOPPING; ensure that it is STOPPED
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java index 3fa85e9..8ac82a0 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
@@ -1117,8 +1117,9 @@ @Override public void verifyCanStart(final Set<ControllerServiceNode> ignoredReferences) { - if (this.getScheduledState() == ScheduledState.RUNNING) { - throw new IllegalStateException(this + " cannot be started because it is already running"); + final ScheduledState currentState = getPhysicalScheduledState(); + if (currentState != ScheduledState.STOPPED && currentState != ScheduledState.DISABLED) { + throw new IllegalStateException(this + " cannot be started because it is not stopped. Current state is " + currentState.name()); } verifyNoActiveThreads();