[
https://issues.apache.org/jira/browse/NIFI-2861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15572000#comment-15572000
]
ASF GitHub Bot commented on NIFI-2861:
--------------------------------------
Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1127#discussion_r83220736
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ControlRate.java
---
@@ -228,12 +238,13 @@ public void onScheduled(final ProcessContext context)
{
rateControlAttribute =
context.getProperty(RATE_CONTROL_ATTRIBUTE_NAME).getValue();
maximumRateStr =
context.getProperty(MAX_RATE).getValue().toUpperCase();
groupingAttributeName =
context.getProperty(GROUPING_ATTRIBUTE_NAME).getValue();
+ maxFlowFilePerTrigger =
context.getProperty(MAX_FF_PER_TRIGGER).getValue();
--- End diff --
This should probably be defined as an int, rather than a String, and can
then just use context.getProperty().asInteger(). But I really prefer to remove
this property all together.
> ControlRate should accept more than one flow file per execution
> ---------------------------------------------------------------
>
> Key: NIFI-2861
> URL: https://issues.apache.org/jira/browse/NIFI-2861
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.0.0, 0.7.0
> Reporter: Joe Skora
> Assignee: Joe Skora
>
> The {{ControlRate}} processor implements a {{FlowFileFilter}} that returns
> the {{FlowFileFilter.ACCEPT_AND_TERMINATE}} result if the {{FlowFile}} fits
> with the rate limit, affectively limiting it to one {{FlowFile}} per
> {{ConrolRate.onTrigger()}} invocation. This is a significant bottleneck when
> processing very large quantities of small files making it unlikely to hit the
> rate limits.
> It should allow multiple files, perhaps with a configurable maximum, per
> {{ControlRate.onTrigger()}} invocation by issuing the
> {{FlowFileFilter.ACCEPT_AND_CONTINUE}} result until the limits are reached.
> In a preliminary test this eliminated the bottleneck.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)