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?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to