You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jo...@apache.org on 2016/03/15 18:25:27 UTC
[1/2] nifi git commit: NIFI-1627: Do not call context.yield for
funnels and local ports;
use batch size of 100 instead of 10 for local ports and funnels
Repository: nifi
Updated Branches:
refs/heads/master 54670486b -> cfeebfe7c
NIFI-1627: Do not call context.yield for funnels and local ports; use batch size of 100 instead of 10 for local ports and funnels
Signed-off-by: joewitt <jo...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/a4a7d537
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/a4a7d537
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/a4a7d537
Branch: refs/heads/master
Commit: a4a7d537696a279bbd9171aee916f33b679051ea
Parents: 5467048
Author: Mark Payne <ma...@hotmail.com>
Authored: Tue Mar 15 11:45:29 2016 -0400
Committer: joewitt <jo...@apache.org>
Committed: Tue Mar 15 12:54:03 2016 -0400
----------------------------------------------------------------------
.../main/java/org/apache/nifi/controller/StandardFunnel.java | 8 +-------
.../src/main/java/org/apache/nifi/connectable/LocalPort.java | 6 ++----
2 files changed, 3 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/a4a7d537/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/StandardFunnel.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/StandardFunnel.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/StandardFunnel.java
index 647e4d5..9fb13f6 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/StandardFunnel.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/StandardFunnel.java
@@ -349,22 +349,16 @@ public class StandardFunnel implements Funnel {
readLock.lock();
try {
Set<Relationship> available = context.getAvailableRelationships();
- int transferred = 0;
while (!available.isEmpty()) {
- final List<FlowFile> flowFiles = session.get(10);
+ final List<FlowFile> flowFiles = session.get(100);
if (flowFiles.isEmpty()) {
break;
}
- transferred += flowFiles.size();
session.transfer(flowFiles, Relationship.ANONYMOUS);
session.commit();
available = context.getAvailableRelationships();
}
-
- if (transferred == 0) {
- context.yield();
- }
} finally {
readLock.unlock();
}
http://git-wip-us.apache.org/repos/asf/nifi/blob/a4a7d537/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/connectable/LocalPort.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/connectable/LocalPort.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/connectable/LocalPort.java
index ceb85f2..9432d6c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/connectable/LocalPort.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/connectable/LocalPort.java
@@ -73,10 +73,8 @@ public class LocalPort extends AbstractPort {
public void onTrigger(final ProcessContext context, final ProcessSession session) {
readLock.lock();
try {
- final List<FlowFile> flowFiles = session.get(10);
- if (flowFiles.isEmpty()) {
- context.yield();
- } else {
+ final List<FlowFile> flowFiles = session.get(100);
+ if (!flowFiles.isEmpty()) {
session.transfer(flowFiles, Relationship.ANONYMOUS);
}
} finally {
[2/2] nifi git commit: NIFI-1464 fixed OnScheduled invocation to pass
ProcessContext
Posted by jo...@apache.org.
NIFI-1464 fixed OnScheduled invocation to pass ProcessContext
NIFI-1464 removed unused imports
Signed-off-by: joewitt <jo...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/cfeebfe7
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/cfeebfe7
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/cfeebfe7
Branch: refs/heads/master
Commit: cfeebfe7c744f4f0f239ea8256f1adfb62ae6049
Parents: a4a7d53
Author: Oleg Zhurakousky <ol...@suitcase.io>
Authored: Tue Mar 15 09:48:29 2016 -0400
Committer: joewitt <jo...@apache.org>
Committed: Tue Mar 15 12:54:13 2016 -0400
----------------------------------------------------------------------
.../org/apache/nifi/controller/StandardProcessorNode.java | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/cfeebfe7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
----------------------------------------------------------------------
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 fa7bd30..bb04d90 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
@@ -70,9 +70,7 @@ import org.apache.nifi.processor.ProcessContext;
import org.apache.nifi.processor.ProcessSessionFactory;
import org.apache.nifi.processor.Processor;
import org.apache.nifi.processor.Relationship;
-import org.apache.nifi.processor.SchedulingContext;
import org.apache.nifi.processor.SimpleProcessLogger;
-import org.apache.nifi.processor.StandardSchedulingContext;
import org.apache.nifi.scheduling.SchedulingStrategy;
import org.apache.nifi.util.FormatUtils;
import org.apache.nifi.util.NiFiProperties;
@@ -1245,12 +1243,8 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable
@Override
public Void call() throws Exception {
try (final NarCloseable nc = NarCloseable.withNarLoader()) {
- SchedulingContext schedulingContext = new StandardSchedulingContext(processContext,
- getControllerServiceProvider(), StandardProcessorNode.this,
- processContext.getStateManager());
ReflectionUtils.invokeMethodsWithAnnotations(OnScheduled.class,
- org.apache.nifi.processor.annotation.OnScheduled.class, processor,
- schedulingContext);
+ org.apache.nifi.processor.annotation.OnScheduled.class, processor, processContext);
return null;
}
}