NIFI-2333: Consider reporting tasks and controller services when determining whether or not flow is empty

This closes #693

Signed-off-by: jpercivall <joepercivall@yahoo.com>
This commit is contained in:
Mark Payne 2016-07-20 15:25:32 -04:00 committed by jpercivall
parent 10b91ffe6c
commit 370d88eeeb
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ public class StandardFlowSynchronizer implements FlowSynchronizer {
try {
if (initialized) {
existingFlow = toBytes(controller);
existingFlowEmpty = controller.getGroup(controller.getRootGroupId()).isEmpty();
existingFlowEmpty = controller.getGroup(controller.getRootGroupId()).isEmpty() && controller.getAllReportingTasks().isEmpty() && controller.getAllControllerServices().isEmpty();
} else {
existingFlow = readFlowFromDisk();
if (existingFlow == null || existingFlow.length == 0) {