You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by James McMahon <js...@gmail.com> on 2017/03/29 20:12:07 UTC

How does lib_community get included in NiFi nar search path?

I am getting indications that my Python scripts being called by my
InvokeScriptedProcessor processors are not finding callbacks nor PySet. I
believe those may be in nars in lib_community. I don't see any explicit
inclusion of lib_community in nifi.properties nor in bootstrap.conf. How
does NiFi know to include lib_community in the libs it uses to find classes?

Thnak you. - Jim

Re: How does lib_community get included in NiFi nar search path?

Posted by Matt Burgess <ma...@gmail.com>.
Jim,

You said your Python modules might be in NARs? If so I'm not sure InvokeScriptedProcessor can pick them up. Normally Python modules are installed or otherwise located in a directory, and you add that directory to the Module Directory property of InvokeScriptedProcessor, and it will do a sys.import (or whatever it's called) for you. Apologies if I've misunderstood, just adding this for more info.

Regards,
Matt


> On Mar 29, 2017, at 4:12 PM, James McMahon <js...@gmail.com> wrote:
> 
> I am getting indications that my Python scripts being called by my InvokeScriptedProcessor processors are not finding callbacks nor PySet. I believe those may be in nars in lib_community. I don't see any explicit inclusion of lib_community in nifi.properties nor in bootstrap.conf. How does NiFi know to include lib_community in the libs it uses to find classes?
> 
> Thnak you. - Jim 

Re: How does lib_community get included in NiFi nar search path?

Posted by James McMahon <js...@gmail.com>.
No, it appears that an entry is now in nifi.properties that does indeed
tell NiFi to also look in lib_community. It looks like tis (in 0.7.x):

nifi.nar.library.directory.community=./lib_community

And so I can only presume it is looking in that lib directory as well as in
nifi.nar.library.directory=./lib.

Is there a way I can check in the nars in lib and lib_community to see if
PySet and org.python.core for callbacks is in any of them? Could it be that
this community property in nifi.properties is not actually effective
because I did not follow the naming convention you provided in your answer
Aldrin?
Jim

On Wed, Mar 29, 2017 at 4:23 PM, Aldrin Piri <al...@gmail.com> wrote:

> Hi Jim,
>
> lib_community is not one of the default directories NiFi searches.
>
> You can update nifi.properties to include additional paths via properties
> such as those outlined in the System Administrator's guide in Core
> Properties for nifi.nar.library.directory [1].  The description of this
> follows:
>
>
> The location of the nar library. The default value is ./lib and probably
> should be left as is.
>
> NOTE: Additional library directories can be specified by using the
> nifi.nar.library.directory. prefix with unique suffixes and separate paths
> as values.
>
> For example, to provide two additional library locations, a user could
> also specify additional properties with keys of:
>
> nifi.nar.library.directory.lib1=/nars/lib1
> nifi.nar.library.directory.lib2=/nars/lib2
>
> Providing three total locations, including nifi.nar.library.directory.
>
> [1] https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#
> core-properties-br
>
> On Wed, Mar 29, 2017 at 4:12 PM, James McMahon <js...@gmail.com>
> wrote:
>
>> I am getting indications that my Python scripts being called by my
>> InvokeScriptedProcessor processors are not finding callbacks nor PySet. I
>> believe those may be in nars in lib_community. I don't see any explicit
>> inclusion of lib_community in nifi.properties nor in bootstrap.conf. How
>> does NiFi know to include lib_community in the libs it uses to find classes?
>>
>> Thnak you. - Jim
>>
>
>

Re: How does lib_community get included in NiFi nar search path?

Posted by James McMahon <js...@gmail.com>.
Thank you very much Aldrin. I will do this. -Jim

On Wed, Mar 29, 2017 at 4:23 PM, Aldrin Piri <al...@gmail.com> wrote:

> Hi Jim,
>
> lib_community is not one of the default directories NiFi searches.
>
> You can update nifi.properties to include additional paths via properties
> such as those outlined in the System Administrator's guide in Core
> Properties for nifi.nar.library.directory [1].  The description of this
> follows:
>
>
> The location of the nar library. The default value is ./lib and probably
> should be left as is.
>
> NOTE: Additional library directories can be specified by using the
> nifi.nar.library.directory. prefix with unique suffixes and separate paths
> as values.
>
> For example, to provide two additional library locations, a user could
> also specify additional properties with keys of:
>
> nifi.nar.library.directory.lib1=/nars/lib1
> nifi.nar.library.directory.lib2=/nars/lib2
>
> Providing three total locations, including nifi.nar.library.directory.
>
> [1] https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#
> core-properties-br
>
> On Wed, Mar 29, 2017 at 4:12 PM, James McMahon <js...@gmail.com>
> wrote:
>
>> I am getting indications that my Python scripts being called by my
>> InvokeScriptedProcessor processors are not finding callbacks nor PySet. I
>> believe those may be in nars in lib_community. I don't see any explicit
>> inclusion of lib_community in nifi.properties nor in bootstrap.conf. How
>> does NiFi know to include lib_community in the libs it uses to find classes?
>>
>> Thnak you. - Jim
>>
>
>

Re: How does lib_community get included in NiFi nar search path?

Posted by Aldrin Piri <al...@gmail.com>.
Hi Jim,

lib_community is not one of the default directories NiFi searches.

You can update nifi.properties to include additional paths via properties
such as those outlined in the System Administrator's guide in Core
Properties for nifi.nar.library.directory [1].  The description of this
follows:


The location of the nar library. The default value is ./lib and probably
should be left as is.

NOTE: Additional library directories can be specified by using the
nifi.nar.library.directory. prefix with unique suffixes and separate paths
as values.

For example, to provide two additional library locations, a user could also
specify additional properties with keys of:

nifi.nar.library.directory.lib1=/nars/lib1
nifi.nar.library.directory.lib2=/nars/lib2

Providing three total locations, including nifi.nar.library.directory.

[1]
https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#core-properties-br

On Wed, Mar 29, 2017 at 4:12 PM, James McMahon <js...@gmail.com> wrote:

> I am getting indications that my Python scripts being called by my
> InvokeScriptedProcessor processors are not finding callbacks nor PySet. I
> believe those may be in nars in lib_community. I don't see any explicit
> inclusion of lib_community in nifi.properties nor in bootstrap.conf. How
> does NiFi know to include lib_community in the libs it uses to find classes?
>
> Thnak you. - Jim
>