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

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

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

    https://github.com/apache/nifi/pull/1306#discussion_r112599056
  
    --- 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 --
    
    There is one reason why I did this way, that is to let user clear these 
batch settings. Especially batchCount is difficult to clear since it is Integer 
field in DTO. I thought we won't be able to know if user wanted to clear a 
batch setting or leave it as is but update other data partially. If it is a 
String field, we maybe able to distinct these two operation by checking if it's 
null (leave as it is) or empty string (clear, empty value). Having null values 
have different meaning in aspect of controlling batch operation.
    
    So, I grouped these three batch settings to treat as one single setting. 
Would documenting these details at `@ApiModelProperty` description suffice?


> 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