I misrepresented that first impediment. It turns out that this problem did not go away, but was not reported because it appears that it reports only the first error it encounters, and the callbacks problem was obscuring this one.
On Thu, Mar 30, 2017 at 7:14 AM, James McMahon <[email protected]> wrote: > Hello. I am running NiFi v0.7. I've recently started working with > InvokeScriptedProcessor processor (we'll label this as ISP) in an effort to > establish logging resources once and only once via the initialize() feature > of ISP. > > First impediment: > I've noticed that ISP often does not detect refinements in my script. For > example, in the UI the processor reported that on line 17 of my script name > 'Streamcallback' was not defined. Easy to fix: typo needed to be > StreamCallback. Corrected the script, refreshed the UI page, but the UI > continued to report the same problem. Ultimately my only recourse was to > completely stop and restart NiFi. Only then was that error was no longer > reported. > How should script changes be forced to the ISP processor? > > Second impediment: > Am getting an import error, as follows: > ImportError: no module named callbacks in <script> at line number 13 > Here is what I have on line 13: > from callbacks import Compress, Decompress > There's no magic or brilliance here. I copied this directly from an > example recommended by Matt B. here: https://github.com/apache/ > nifi/blob/master/nifi-nar-bundles/nifi-scripting-bundle/ > nifi-scripting-processors/src/test/resources/jython/test_compress.py > So suspecting that I needed to include a module with callbacks in my value > for Module Directory in the ISP configuration, I did this at my Linux > command line: > locate callbacks > I found this: /usr/lib/python2.6/site-packages/yum/callbacks.py. > I included /usr/lib/python2.6/site-packages/yum in Module Directory > comma-separated value list. > This does not eliminate the error. > Why is ISP still not recognizing callbacks, and how do I resolve this > impediment? > How can I determine whether callbacks is included in any of the many nars > I find in nifi native install directories lib or lib_community? > > Thank you for any assistance or insights you can provide. > > Jim >
