Repository: incubator-nifi Updated Branches: refs/heads/develop 3a27c378c -> 909ded32a
NIFI-443: If a funnel is given an incoming connection but has no outgoing connection, it continually runs and fails, logging a lot of ERROR messages Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/42a4f902 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/42a4f902 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/42a4f902 Branch: refs/heads/develop Commit: 42a4f9024262c2b6e1871d6406e81ba72695f9ab Parents: 3a27c37 Author: Mark Payne <[email protected]> Authored: Fri Mar 27 14:46:20 2015 -0400 Committer: Mark Payne <[email protected]> Committed: Fri Mar 27 14:46:20 2015 -0400 ---------------------------------------------------------------------- .../nifi/controller/tasks/ContinuallyRunConnectableTask.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/42a4f902/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ContinuallyRunConnectableTask.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ContinuallyRunConnectableTask.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ContinuallyRunConnectableTask.java index 408032c..a1219a4 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ContinuallyRunConnectableTask.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ContinuallyRunConnectableTask.java @@ -21,6 +21,7 @@ import java.util.concurrent.atomic.AtomicLong; import org.apache.nifi.annotation.lifecycle.OnStopped; import org.apache.nifi.connectable.Connectable; +import org.apache.nifi.connectable.ConnectableType; import org.apache.nifi.controller.repository.StandardProcessSessionFactory; import org.apache.nifi.controller.scheduling.ProcessContextFactory; import org.apache.nifi.controller.scheduling.ScheduleState; @@ -69,7 +70,9 @@ public class ContinuallyRunConnectableTask implements Callable<Boolean> { final boolean triggerWhenEmpty = connectable.isTriggerWhenEmpty(); boolean flowFilesQueued = true; final boolean shouldRun = (connectable.getYieldExpiration() < System.currentTimeMillis()) - && (triggerWhenEmpty || (flowFilesQueued = Connectables.flowFilesQueued(connectable))) && (connectable.getRelationships().isEmpty() || Connectables.anyRelationshipAvailable(connectable)); + && (triggerWhenEmpty || (flowFilesQueued = Connectables.flowFilesQueued(connectable))) + && (connectable.getConnectableType() != ConnectableType.FUNNEL || !connectable.getConnections().isEmpty()) + && (connectable.getRelationships().isEmpty() || Connectables.anyRelationshipAvailable(connectable)); if (shouldRun) { scheduleState.incrementActiveThreadCount();
