briansolo1985 commented on code in PR #9699:
URL: https://github.com/apache/nifi/pull/9699#discussion_r1944300279
##########
minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/json/TransformNifiCommandFactory.java:
##########
@@ -101,4 +104,17 @@ private void persistFlowJson(VersionedDataflow flow,
String flowJsonPath) throws
ConfigMain.ERR_UNABLE_TO_SAVE_CONFIG, e);
}
}
+
+ private void setDefaultValues(VersionedDataflow versionedDataflow) {
+
versionedDataflow.setMaxTimerDrivenThreadCount(CorePropertiesSchema.DEFAULT_MAX_CONCURRENT_THREADS);
+
versionedDataflow.getRootGroup().getRemoteProcessGroups().forEach(this::setDefaultValues);
Review Comment:
I think we should traverse all child process groups recursively, so all the
necessary components' properties will be set. A possible implementation could
be:
```
private void setDefaultValues(VersionedDataflow versionedDataflow) {
versionedDataflow.setMaxTimerDrivenThreadCount(CorePropertiesSchema.DEFAULT_MAX_CONCURRENT_THREADS);
setDefaultValues(versionedDataflow.getRootGroup());
}
private void setDefaultValues(VersionedProcessGroup
versionedProcessGroup) {
versionedProcessGroup.getRemoteProcessGroups().forEach(this::setDefaultValues);
versionedProcessGroup.getProcessGroups().forEach(this::setDefaultValues);
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]