[ https://issues.apache.org/jira/browse/MINIFICPP-2304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gábor Gyimesi reassigned MINIFICPP-2304: ---------------------------------------- Assignee: Gábor Gyimesi > Clean up Python processor initialization > ---------------------------------------- > > Key: MINIFICPP-2304 > URL: https://issues.apache.org/jira/browse/MINIFICPP-2304 > Project: Apache NiFi MiNiFi C++ > Issue Type: Improvement > Reporter: Gábor Gyimesi > Assignee: Gábor Gyimesi > Priority: Major > > Python processor initialization should be refactored to be cleaner. We > instantiate the Python processors twice: > We instantiate the Python processors that are used in the configured MiNiFi > flow. This is straightforward and not problematic. > The problem is that before that we also instantiate all python processors in > the PythonCreator::registerScriptDescription method for getting the class > description for all available python processors for the agent manifest > * In this scenario we call the Python processors' initialize method twice: > ** Once the PythonObjectFactory::create method calls it to initialize the > supported properties to set the ScriptFile property to the path of the Python > processor > ** After this the PythonCreator::registerScriptDescription also calls it > explicitly to load the python processor from the set path > ** This should be circumvented to not need double initialization and have a > telling warning message in ExecutePythonProcessor::initialize() if the > loadScript method fails > * We should also find a way to avoid initializing all the Python processors > and retrieve the processor data without it. With NiFi Python processors a way > for this could be to use the "ast" python module to retrieve the processor > details which does not require loading the python module -- This message was sent by Atlassian Jira (v8.20.10#820010)