[
https://issues.apache.org/jira/browse/NIFI-1202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15978707#comment-15978707
]
ASF GitHub Bot commented on NIFI-1202:
--------------------------------------
Github user mcgilman commented on the issue:
https://github.com/apache/nifi/pull/1306
Thanks for the updates. Continuing to follow up on the partial update... is
there a reason that batchCount, batchSize, and batchDuration must be updated as
a single unit? Should a user not but able to just set just one of them? It
seems the logic in `StandardRemoteGroupPort` considers each field individually
and each, if set, could allow for the termination of a transaction.
```
if (maxBatchCount > 0 && flowFilesSent.size() >= maxBatchCount) {
flowFile = null; // if maxBatchCount is set and current transaction
exceeds, stop
} else if (maxBatchBytes > 0 && bytesSent >= maxBatchBytes) {
flowFile = null; // if maxBatchBytes is set and current transaction
exceeds, stop
} else if (sendingNanos >= maxBatchDuration) {
flowFile = null; // if maxBatchDuration is set (default of 500 millis if
not) and current transaction exceeds, stop
} else {
flowFile = session.get(); // continue the transaction
}
```
I don't see a reason to prevent setting just the batchSize for instance. I
think this can accomplish by updating `StandardRemoteProcessGroupDAO` and
treating each field independently. For instance in `updatePort(...)`
```
if (isNotNull(batchCount)) {
port.setBatchCount(batchCount);
}
if (isNotNull(batchSize)) {
port.setBatchSize(batchSize);
}
if (isNotNull(batchDuration)) {
port.setBatchDuration(batchDuration);
}
```
Please let me know if I'm missing something about why all of these fields
must be updated in the same request.
Thanks again!
> Allow user to configure Batch Size for site-to-site
> ---------------------------------------------------
>
> Key: NIFI-1202
> URL: https://issues.apache.org/jira/browse/NIFI-1202
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework, Core UI, Documentation & Website
> Reporter: Mark Payne
> Assignee: Koji Kawamura
> Attachments: configure-remote-port-window.png,
> WIP-added-batch-settings-ui.png
>
>
> Currently, there is no way for a user to specify the batch size that
> Site-to-Site will use. The framework decides this for you. However, if we
> want to use the List/Fetch Pattern, it will be helpful to specify a small
> batch size so that a small number of things that are listed are still well
> distributed across the cluster.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)