Skip to content

Commit 3fbc0c0

Browse files
authored
NIFI-14434 Avoid calling OnRemoved when Processor is Reloaded (#9914)
- Processor reloading includes certain property modifications and processor termination Signed-off-by: David Handermann <[email protected]>
1 parent 36d5392 commit 3fbc0c0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardReloadComponent.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,8 @@ public void reload(final ProcessorNode existingNode, final String newType, final
8080
final StandardProcessContext processContext = new StandardProcessContext(existingNode, flowController.getControllerServiceProvider(),
8181
stateManager, () -> false, flowController);
8282

83-
// call OnRemoved for the existing processor using the previous instance class loader
84-
try (final NarCloseable ignored = NarCloseable.withComponentNarLoader(existingInstanceClassLoader)) {
85-
ReflectionUtils.quietlyInvokeMethodsWithAnnotation(OnRemoved.class, existingNode.getProcessor(), processContext);
86-
} finally {
87-
extensionManager.closeURLClassLoader(id, existingInstanceClassLoader);
88-
}
83+
// Cleanup the URL ClassLoader for the existing processor instance.
84+
extensionManager.closeURLClassLoader(id, existingInstanceClassLoader);
8985

9086
// Ensure that we notify the Python Bridge that we're removing the old processor, if the Processor is Python based.
9187
// This way we can shutdown the Process if necessary before creating a new processor (which may then spawn a new process).

0 commit comments

Comments
 (0)