[ 
https://issues.apache.org/jira/browse/NIFI-1202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15976833#comment-15976833
 ] 

ASF GitHub Bot commented on NIFI-1202:
--------------------------------------

Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1306#discussion_r112474822
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardRemoteProcessGroupDAO.java
 ---
    @@ -318,13 +329,35 @@ public RemoteGroupPort 
updateRemoteProcessGroupOutputPort(String remoteProcessGr
             verifyUpdatePort(port, remoteProcessGroupPortDto);
     
             // perform the update
    +        updatePort(port, remoteProcessGroupPortDto, remoteProcessGroup);
    +
    +        return port;
    +    }
    +
    +    /**
    +     *
    +     * @param port Port instance to be updated.
    +     * @param remoteProcessGroupPortDto DTO containing updated remote 
process group port settings.
    +     * @param remoteProcessGroup If remoteProcessGroupPortDto has updated 
isTransmitting input,
    +     *                           this method will start or stop the port 
in this remoteProcessGroup as necessary.
    +     */
    +    private void updatePort(RemoteGroupPort port, 
RemoteProcessGroupPortDTO remoteProcessGroupPortDto, RemoteProcessGroup 
remoteProcessGroup) {
             if 
(isNotNull(remoteProcessGroupPortDto.getConcurrentlySchedulableTaskCount())) {
                 
port.setMaxConcurrentTasks(remoteProcessGroupPortDto.getConcurrentlySchedulableTaskCount());
             }
             if (isNotNull(remoteProcessGroupPortDto.getUseCompression())) {
                 
port.setUseCompression(remoteProcessGroupPortDto.getUseCompression());
             }
     
    +        final Integer batchCount = 
remoteProcessGroupPortDto.getBatchCount();
    +        final String batchSize = remoteProcessGroupPortDto.getBatchSize();
    +        final String batchDuration = 
remoteProcessGroupPortDto.getBatchDuration();
    +        if (isAnyNotNull(batchCount, batchSize, batchDuration)) {
    --- End diff --
    
    Is there a reason we are setting all three batch settings when any one of 
them have been specified. In our other endpoints, we support partial updating. 
For instance, if a field is not specified in the incoming request it's 
underlying value will not be changed. With this approach, if the incoming 
request only contains a batchCount, it will result in setting the batchSize and 
batchDuration to null effectively clearing their current value. I think we want 
separate if statements for each field to remain consistent.


> 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)

Reply via email to