You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Mike Harding <mi...@gmail.com> on 2016/08/31 15:01:59 UTC

Drop FlowFIle in ExecuteScript

Hi all,

I have an ExecuteScript processor that creates new flow files to pass on to
downstream processors from an incoming flowfile.

Once I have generated and transferred the newly created flowfiles to a
"SUCCESS" relationship I then transfer the original flow file to an
auto-terminating failure relationship and that kind of works. But I'm just
wondering in reality is this flowfile actually being purged from nifi
(after some default expiration?) or is there some way I can explicitly drop
the flowfile in my ExecuteScript processor (javascript) code? Whats the
default behaviour here?

Cheers,
Mike

Re: Drop FlowFIle in ExecuteScript

Posted by Mike Harding <mi...@gmail.com>.
Exactly what I was looking for - cheers again.

Mike

On 31 August 2016 at 16:25, Matt Burgess <ma...@apache.org> wrote:

> Actually I just found them hosted on javadoc.io, nice service that
> will grab the javadoc from Maven Central and host it for "any"
> artifact:
>
> https://www.javadoc.io/doc/org.apache.nifi/nifi-api/1.0.0
>
> Regards,
> Matt
>
> On Wed, Aug 31, 2016 at 11:20 AM, Matt Burgess <ma...@apache.org>
> wrote:
> > The Javadocs are not on the NiFi web site but there are a couple of
> > ways to get them:
> >
> > 1) The source code for ProcessSession is at:
> > https://github.com/apache/nifi/blob/master/nifi-api/src/
> main/java/org/apache/nifi/processor/ProcessSession.java
> > 2) You can download the nifi-api javadocs at
> > https://repository.apache.org/content/repositories/releases/
> org/apache/nifi/nifi-api/1.0.0/
> > (this works for each module that contains source code)
> > 3) Also you can build the Javadocs yourself with mvn javadoc:javadoc
> >
> > Regards,
> > Matt
> >
> > On Wed, Aug 31, 2016 at 11:06 AM, Mike Harding <mi...@gmail.com>
> wrote:
> >> Cheers Matt - is there any API documentation for the Session object
> online ?
> >>
> >> On 31 August 2016 at 16:03, Matt Burgess <ma...@gmail.com> wrote:
> >>>
> >>> Mike,
> >>>
> >>> You can explicitly drop the flow file using session.remove(flowFile).
> >>> I believe for auto-terminating connections that is what is happening
> >>> under the hood.
> >>>
> >>> Regards,
> >>> Matt
> >>>
> >>> On Wed, Aug 31, 2016 at 11:01 AM, Mike Harding <mikeyharding@gmail.com
> >
> >>> wrote:
> >>> > Hi all,
> >>> >
> >>> > I have an ExecuteScript processor that creates new flow files to
> pass on
> >>> > to
> >>> > downstream processors from an incoming flowfile.
> >>> >
> >>> > Once I have generated and transferred the newly created flowfiles to
> a
> >>> > "SUCCESS" relationship I then transfer the original flow file to an
> >>> > auto-terminating failure relationship and that kind of works. But I'm
> >>> > just
> >>> > wondering in reality is this flowfile actually being purged from nifi
> >>> > (after
> >>> > some default expiration?) or is there some way I can explicitly drop
> the
> >>> > flowfile in my ExecuteScript processor (javascript) code? Whats the
> >>> > default
> >>> > behaviour here?
> >>> >
> >>> > Cheers,
> >>> > Mike
> >>
> >>
>

Re: Drop FlowFIle in ExecuteScript

Posted by Matt Burgess <ma...@apache.org>.
Actually I just found them hosted on javadoc.io, nice service that
will grab the javadoc from Maven Central and host it for "any"
artifact:

https://www.javadoc.io/doc/org.apache.nifi/nifi-api/1.0.0

Regards,
Matt

On Wed, Aug 31, 2016 at 11:20 AM, Matt Burgess <ma...@apache.org> wrote:
> The Javadocs are not on the NiFi web site but there are a couple of
> ways to get them:
>
> 1) The source code for ProcessSession is at:
> https://github.com/apache/nifi/blob/master/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java
> 2) You can download the nifi-api javadocs at
> https://repository.apache.org/content/repositories/releases/org/apache/nifi/nifi-api/1.0.0/
> (this works for each module that contains source code)
> 3) Also you can build the Javadocs yourself with mvn javadoc:javadoc
>
> Regards,
> Matt
>
> On Wed, Aug 31, 2016 at 11:06 AM, Mike Harding <mi...@gmail.com> wrote:
>> Cheers Matt - is there any API documentation for the Session object online ?
>>
>> On 31 August 2016 at 16:03, Matt Burgess <ma...@gmail.com> wrote:
>>>
>>> Mike,
>>>
>>> You can explicitly drop the flow file using session.remove(flowFile).
>>> I believe for auto-terminating connections that is what is happening
>>> under the hood.
>>>
>>> Regards,
>>> Matt
>>>
>>> On Wed, Aug 31, 2016 at 11:01 AM, Mike Harding <mi...@gmail.com>
>>> wrote:
>>> > Hi all,
>>> >
>>> > I have an ExecuteScript processor that creates new flow files to pass on
>>> > to
>>> > downstream processors from an incoming flowfile.
>>> >
>>> > Once I have generated and transferred the newly created flowfiles to a
>>> > "SUCCESS" relationship I then transfer the original flow file to an
>>> > auto-terminating failure relationship and that kind of works. But I'm
>>> > just
>>> > wondering in reality is this flowfile actually being purged from nifi
>>> > (after
>>> > some default expiration?) or is there some way I can explicitly drop the
>>> > flowfile in my ExecuteScript processor (javascript) code? Whats the
>>> > default
>>> > behaviour here?
>>> >
>>> > Cheers,
>>> > Mike
>>
>>

Re: Drop FlowFIle in ExecuteScript

Posted by Matt Burgess <ma...@apache.org>.
The Javadocs are not on the NiFi web site but there are a couple of
ways to get them:

1) The source code for ProcessSession is at:
https://github.com/apache/nifi/blob/master/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java
2) You can download the nifi-api javadocs at
https://repository.apache.org/content/repositories/releases/org/apache/nifi/nifi-api/1.0.0/
(this works for each module that contains source code)
3) Also you can build the Javadocs yourself with mvn javadoc:javadoc

Regards,
Matt

On Wed, Aug 31, 2016 at 11:06 AM, Mike Harding <mi...@gmail.com> wrote:
> Cheers Matt - is there any API documentation for the Session object online ?
>
> On 31 August 2016 at 16:03, Matt Burgess <ma...@gmail.com> wrote:
>>
>> Mike,
>>
>> You can explicitly drop the flow file using session.remove(flowFile).
>> I believe for auto-terminating connections that is what is happening
>> under the hood.
>>
>> Regards,
>> Matt
>>
>> On Wed, Aug 31, 2016 at 11:01 AM, Mike Harding <mi...@gmail.com>
>> wrote:
>> > Hi all,
>> >
>> > I have an ExecuteScript processor that creates new flow files to pass on
>> > to
>> > downstream processors from an incoming flowfile.
>> >
>> > Once I have generated and transferred the newly created flowfiles to a
>> > "SUCCESS" relationship I then transfer the original flow file to an
>> > auto-terminating failure relationship and that kind of works. But I'm
>> > just
>> > wondering in reality is this flowfile actually being purged from nifi
>> > (after
>> > some default expiration?) or is there some way I can explicitly drop the
>> > flowfile in my ExecuteScript processor (javascript) code? Whats the
>> > default
>> > behaviour here?
>> >
>> > Cheers,
>> > Mike
>
>

Re: Drop FlowFIle in ExecuteScript

Posted by Mike Harding <mi...@gmail.com>.
Cheers Matt - is there any API documentation for the Session object online ?

On 31 August 2016 at 16:03, Matt Burgess <ma...@gmail.com> wrote:

> Mike,
>
> You can explicitly drop the flow file using session.remove(flowFile).
> I believe for auto-terminating connections that is what is happening
> under the hood.
>
> Regards,
> Matt
>
> On Wed, Aug 31, 2016 at 11:01 AM, Mike Harding <mi...@gmail.com>
> wrote:
> > Hi all,
> >
> > I have an ExecuteScript processor that creates new flow files to pass on
> to
> > downstream processors from an incoming flowfile.
> >
> > Once I have generated and transferred the newly created flowfiles to a
> > "SUCCESS" relationship I then transfer the original flow file to an
> > auto-terminating failure relationship and that kind of works. But I'm
> just
> > wondering in reality is this flowfile actually being purged from nifi
> (after
> > some default expiration?) or is there some way I can explicitly drop the
> > flowfile in my ExecuteScript processor (javascript) code? Whats the
> default
> > behaviour here?
> >
> > Cheers,
> > Mike
>

Re: Drop FlowFIle in ExecuteScript

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

You can explicitly drop the flow file using session.remove(flowFile).
I believe for auto-terminating connections that is what is happening
under the hood.

Regards,
Matt

On Wed, Aug 31, 2016 at 11:01 AM, Mike Harding <mi...@gmail.com> wrote:
> Hi all,
>
> I have an ExecuteScript processor that creates new flow files to pass on to
> downstream processors from an incoming flowfile.
>
> Once I have generated and transferred the newly created flowfiles to a
> "SUCCESS" relationship I then transfer the original flow file to an
> auto-terminating failure relationship and that kind of works. But I'm just
> wondering in reality is this flowfile actually being purged from nifi (after
> some default expiration?) or is there some way I can explicitly drop the
> flowfile in my ExecuteScript processor (javascript) code? Whats the default
> behaviour here?
>
> Cheers,
> Mike