mattyb149 commented on a change in pull request #5415:
URL: https://github.com/apache/nifi/pull/5415#discussion_r717175855



##########
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardReloadComponent.java
##########
@@ -97,6 +97,11 @@ public void reload(final ProcessorNode existingNode, final 
String newType, final
         // need to refresh the properties in case we are changing from ghost 
component to real component
         existingNode.refreshProperties();
 
+        // Notify the processor node that the configuration (properties, e.g.) 
has been restored
+        final StandardProcessContext processContext = new 
StandardProcessContext(existingNode, 
flowController.getControllerServiceProvider(), flowController.getEncryptor(),
+                
flowController.getStateManagerProvider().getStateManager(existingNode.getProcessor().getIdentifier()),
 () -> false, flowController);
+        existingNode.onConfigurationRestored(processContext);

Review comment:
       Good catch, I think so, will look into it

##########
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/ProcessorNode.java
##########
@@ -290,4 +290,11 @@ public abstract void runOnce(ScheduledExecutorService 
scheduler, long administra
      * @return the desired state for this Processor
      */
     public abstract ScheduledState getDesiredState();
+
+    /**
+     * This method will be called once the processor's configuration has been 
restored (on startup, reload, e.g.)
+     *
+     * @param context The ProcessContext associated with the Processor 
configuration
+     */
+    public abstract void onConfigurationRestored(ProcessContext context);

Review comment:
       They will eventually need one, but I think not right now because of 
[NIFI-5547](https://issues.apache.org/jira/browse/NIFI-5547)




-- 
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]


Reply via email to