You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Adam Hunyadi (Jira)" <ji...@apache.org> on 2020/09/04 14:10:00 UTC

[jira] [Created] (MINIFICPP-1355) Investigate and fix the initialization of ExecutePythonProcessor

Adam Hunyadi created MINIFICPP-1355:
---------------------------------------

             Summary: Investigate and fix the initialization of ExecutePythonProcessor
                 Key: MINIFICPP-1355
                 URL: https://issues.apache.org/jira/browse/MINIFICPP-1355
             Project: Apache NiFi MiNiFi C++
          Issue Type: Task
    Affects Versions: 0.7.0
            Reporter: Adam Hunyadi
             Fix For: 1.0.0
         Attachments: Screenshot 2020-09-04 at 16.02.41.png

*Background:*

Currently, even though the tests for ExecutePythonProcessor are passing, if I were to try and load up a configuration that contains an ExecutePythonProcessor, it fails due to trying to load an incorrect script file.

Sample flow:

!Screenshot 2020-09-04 at 16.02.41.png|width=467,height=100!

When trying to check in debugger, it seems like the processors script file is always replaced with an incorrect one, and the processor fails to start.

!https://files.slack.com/files-pri/T024BEHTP-F01942KD4BV/screenshot_2020-08-19_at_13.08.46.png|width=1427,height=288!

This is how it is set:

{code:c++|title=Trace of where the property is overridden}
ConfigurableComponent::setProperty()
std::shared_ptr<core::CoreComponent> create()
ClassLoader::instantiate()
PythonCreator::configure() <- here the first element of classpaths_ is read to overwrite the config
FlowController::initializeExternalComponents()
{code}

When trying to perform the same thing on the 0.7.0 release version, the startup already shows some kind of errors, although they seem different:
{code:python|title=Error log}
[2020-09-04 15:49:53.424] [org::apache::nifi::minifi::python::processors::ExecutePythonProcessor] [error] Caught Exception Mod uleNotFoundError: No module named 'google'
At:
 /Users/adamhunyadi/Documents/Projects/integration_tests/minifi_agent_02/build/nifi-minifi-cpp-0.7.0/minifi-python//google/SentimentAnalyzer.py(28): <module>
[2020-09-04 15:49:53.424] [org::apache::nifi::minifi::python::PythonCreator] [warning] Cannot load SentimentAnalyzer because of ModuleNotFoundError: No module named 'google'
At:
 /Users/adamhunyadi/Documents/Projects/integration_tests/minifi_agent_02/build/nifi-minifi-cpp-0.7.0/minifi-python//google/SentimentAnalyzer.py(28): <module>
[2020-09-04 15:49:53.424] [org::apache::nifi::minifi::python::processors::ExecutePythonProcessor] [error] Caught Exception ModuleNotFoundError: No module named 'vaderSentiment'
At:
 /Users/adamhunyadi/Documents/Projects/integration_tests/minifi_agent_02/build/nifi-minifi-cpp-0.7.0/minifi-python//examples/SentimentAnalysis.py(17): <module>
[2020-09-04 15:49:53.424] [org::apache::nifi::minifi::python::PythonCreator] [warning] Cannot load SentimentAnalysis because of ModuleNotFoundError: No module named 'vaderSentiment'
At:
 /Users/adamhunyadi/Documents/Projects/integration_tests/minifi_agent_02/build/nifi-minifi-cpp-0.7.0/minifi-python//examples/SentimentAnalysis.py(17): <module>
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)