You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/06/17 16:03:31 UTC

[GitHub] [nifi] gresockj commented on a diff in pull request #6128: NIFI-10117: Allowing remote group ports to be synchronized from Stand…

gresockj commented on code in PR #6128:
URL: https://github.com/apache/nifi/pull/6128#discussion_r900288034


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java:
##########
@@ -2739,6 +2742,41 @@ private void updateRemoteProcessGroup(final RemoteProcessGroup rpg, final Versio
         }
     }
 
+    private void synchronizeRemoteGroupPorts(final Set<RemoteGroupPort> remoteGroupPorts, final Set<VersionedRemoteGroupPort> proposedPorts) {
+        final Map<String, VersionedRemoteGroupPort> inputPortsByTargetId = mapRemoteGroupPortsByTargetId(proposedPorts);
+        remoteGroupPorts.forEach(port -> {
+            final VersionedRemoteGroupPort proposedPort = inputPortsByTargetId.get(port.getTargetIdentifier());
+            if (proposedPort != null) {
+                if (proposedPort.getBatchSize() != null) {
+                    final BatchSize batchSize = proposedPort.getBatchSize();
+                    if (batchSize.getSize() != null) {
+                        port.setBatchSize(batchSize.getSize());
+                    }
+                    if (batchSize.getCount() != null) {
+                        port.setBatchCount(batchSize.getCount());
+                    }
+                    if (batchSize.getDuration() != null) {

Review Comment:
   Good call -- that totally makes sense.  Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org