mirror of https://github.com/apache/nifi.git
NIFI-1676: Do not allow Processor to be started if state is STOPPING; ensure that it is STOPPED
This commit is contained in:
parent
423b333b71
commit
b95a82f4a5
|
@ -1117,8 +1117,9 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable
|
|||
|
||||
@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();
|
||||
|
|
Loading…
Reference in New Issue