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

    https://github.com/apache/nifi/pull/2470#discussion_r168568930
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
 ---
    @@ -3447,11 +3448,32 @@ public void startReportingTask(final 
ReportingTaskNode reportingTaskNode) {
             if (isTerminated()) {
                 throw new IllegalStateException("Cannot start reporting task " 
+ reportingTaskNode.getIdentifier() + " because the controller is terminated");
             }
    -
    +        validateAdditionalResourcesFingerprint(reportingTaskNode);
             reportingTaskNode.verifyCanStart();
             processScheduler.schedule(reportingTaskNode);
         }
     
    +    private void validateAdditionalResourcesFingerprint(ReportingTaskNode 
reportingTaskNode){
    --- End diff --
    
    It seems like this method is very similar to the code needed in the 
controller service provider and the standard process group... since all three 
node types extend from AbstractConfiguredComponent, would it be possible to 
create a single method there like `void reloadIfNecessary()` (or some better 
name) ? 
    
    The logic for calculating the fingerprint, comparing to the existing one, 
and reloading if different should all be able to implemented generically for 
any AbstractConfiguredComponent since the existing fingerprint is already 
stored there.


---

Reply via email to