You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Alessio Palma <al...@docomodigital.com> on 2017/02/20 09:00:31 UTC

Rebel flowfile and python scripts.

Hello all,

there is a strange behavior on our NIFI  installation.

I wrote a script in python and for some reason and sometimes the flowfile does not always moves into it, like in this case:


[cid:bc2b4b7b-c4dc-4a6a-bffb-e78f432a897b]


I see that Queued Duration for the above flowfile  is 07:53:04.557!  What is it waiting for ?

The executeScript processor is running on each node with concurrent Task set to 1.

In attachment there is the flowfile source code.


Any help is appreciated.

Thanks in advance.


AP

RE: Rebel flowfile and python scripts.

Posted by Giovanni Lanzani <gi...@godatadriven.com>.
That’d be very strange. From [0]

NOTE: ExecuteScript will perform a session.commit() at the end of each execution to ensure the operations have been committed. You do not need to (and should not) perform a session.commit() within the script.

If that’s not the case, it sounds like a bug.

@alessio:  you have a strange way of writing Python code.

[0]: https://community.hortonworks.com/articles/75032/executescript-cookbook-part-1.html

From: Wes Lawrence [mailto:wesleyll505@gmail.com]
Sent: Monday, February 20, 2017 4:56 PM
To: users@nifi.apache.org
Subject: Re: Rebel flowfile and python scripts.

Hey Alessio,

I've only used the ExecuteScript processor once before, but the one thing I noticed was the session wasn't being commited after the transfer (session.commit()). If you add that after the transfers on lines 23 and 26, does that make a difference?

Also, what's the timer strategy for this processor? CRON or regular timer?

--Wes

On Mon, Feb 20, 2017 at 4:00 AM, Alessio Palma <al...@docomodigital.com>> wrote:

Hello all,

there is a strange behavior on our NIFI  installation.

I wrote a script in python and for some reason and sometimes the flowfile does not always moves into it, like in this case:



[cid:image001.png@01D28DE3.193A27E0]



I see that Queued Duration for the above flowfile  is 07:53:04.557!  What is it waiting for ?

The executeScript processor is running on each node with concurrent Task set to 1.

In attachment there is the flowfile source code.



Any help is appreciated.

Thanks in advance.



AP


Re: Rebel flowfile and python scripts.

Posted by Wes Lawrence <we...@gmail.com>.
Hey Alessio,

I've only used the ExecuteScript processor once before, but the one thing I
noticed was the session wasn't being commited after the transfer (
session.commit()). If you add that after the transfers on lines 23 and 26,
does that make a difference?

Also, what's the timer strategy for this processor? CRON or regular timer?

--Wes

On Mon, Feb 20, 2017 at 4:00 AM, Alessio Palma <
alessio.palma@docomodigital.com> wrote:

> Hello all,
>
> there is a strange behavior on our NIFI  installation.
>
> I wrote a script in python and for some reason and sometimes the flowfile
> does not always moves into it, like in this case:
>
>
>
>
> I see that Queued Duration for the above flowfile  is 07:53:04.557!  What
> is it waiting for ?
>
> The executeScript processor is running on each node with concurrent Task
> set to 1.
>
> In attachment there is the flowfile source code.
>
>
> Any help is appreciated.
>
> Thanks in advance.
>
>
> AP
>
>