NIFI-3923: Only start processors after repositories have been initialized. This closes #1817

This commit is contained in:
Mark Payne 2017-05-17 09:31:47 -04:00 committed by Matt Gilman
parent 40a9cd4f2e
commit 9198bee038
No known key found for this signature in database
GPG Key ID: DF61EC19432AEE37
1 changed files with 3 additions and 3 deletions

View File

@ -731,19 +731,19 @@ public class StandardFlowSynchronizer implements FlowSynchronizer {
case DISABLED: case DISABLED:
// switch processor do disabled. This means we have to stop it (if it's already stopped, this method does nothing), // switch processor do disabled. This means we have to stop it (if it's already stopped, this method does nothing),
// and then we have to disable it. // and then we have to disable it.
procNode.getProcessGroup().stopProcessor(procNode); controller.stopProcessor(procNode.getProcessGroupIdentifier(), procNode.getIdentifier());
procNode.getProcessGroup().disableProcessor(procNode); procNode.getProcessGroup().disableProcessor(procNode);
break; break;
case RUNNING: case RUNNING:
// we want to run now. Make sure processor is not disabled and then start it. // we want to run now. Make sure processor is not disabled and then start it.
procNode.getProcessGroup().enableProcessor(procNode); procNode.getProcessGroup().enableProcessor(procNode);
procNode.getProcessGroup().startProcessor(procNode); controller.startProcessor(procNode.getProcessGroupIdentifier(), procNode.getIdentifier());
break; break;
case STOPPED: case STOPPED:
if (procNode.getScheduledState() == ScheduledState.DISABLED) { if (procNode.getScheduledState() == ScheduledState.DISABLED) {
procNode.getProcessGroup().enableProcessor(procNode); procNode.getProcessGroup().enableProcessor(procNode);
} else if (procNode.getScheduledState() == ScheduledState.RUNNING) { } else if (procNode.getScheduledState() == ScheduledState.RUNNING) {
procNode.getProcessGroup().stopProcessor(procNode); controller.stopProcessor(procNode.getProcessGroupIdentifier(), procNode.getIdentifier());
} }
break; break;
} }