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 Thomsen <mi...@gmail.com> on 2018/06/19 19:04:13 UTC

Progamatically clearing out flowfiles

Are there any APIs that could be leveraged internally be a "reset"
processor to tell the flow file repository to purge everything?

Thanks,

Mike

Re: Progamatically clearing out flowfiles

Posted by Daniel Chaffelson <ch...@gmail.com>.
I needed a method of manually clearing down PGs being used for automated
testing of flows, so I created a purge command in the Python client.

http://nipyapi.readthedocs.io/en/latest/_modules/nipyapi/canvas.html#purge_process_group

There's also an option to delete a process group with purge and a force
stop - you are encouraged to super that function to an appropriate name, I
personally use "kill_it_with_fire".

On Wed, Jun 20, 2018 at 1:41 PM Brandon DeVries <br...@jhu.edu> wrote:

> Mike,
>
>      If you want to remove all FlowFiles from the flow, you could use the
> REST api to get the list of all connections
> (/controller/process-groups/root/status?recursive=true), and then issue the
> command to "empty queue" (/flowfile-queues/{id}/drop-requests) on each of
> them.
>
> Brandon
>
> On Tue, Jun 19, 2018 at 11:39 PM Andy LoPresto <al...@apache.org>
> wrote:
>
>> Mike,
>>
>> I don’t believe there are any APIs to perform that action. You could
>> likely achieve it by using an ExecuteStreamCommand processor and invoking
>> “rm -rf /path/to/flowfile_repository” but I’m not sure if that would cause
>> an issue given the triggering flowfile being executed at the time.
>>
>> Andy LoPresto
>> alopresto@apache.org
>> *alopresto.apache@gmail.com <al...@gmail.com>*
>> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
>>
>> On Jun 19, 2018, at 12:04 PM, Mike Thomsen <mi...@gmail.com>
>> wrote:
>>
>> Are there any APIs that could be leveraged internally be a "reset"
>> processor to tell the flow file repository to purge everything?
>>
>> Thanks,
>>
>> Mike
>>
>>
>>

Re: Progamatically clearing out flowfiles

Posted by Brandon DeVries <br...@jhu.edu>.
Mike,

     If you want to remove all FlowFiles from the flow, you could use the
REST api to get the list of all connections
(/controller/process-groups/root/status?recursive=true), and then issue the
command to "empty queue" (/flowfile-queues/{id}/drop-requests) on each of
them.

Brandon

On Tue, Jun 19, 2018 at 11:39 PM Andy LoPresto <al...@apache.org> wrote:

> Mike,
>
> I don’t believe there are any APIs to perform that action. You could
> likely achieve it by using an ExecuteStreamCommand processor and invoking
> “rm -rf /path/to/flowfile_repository” but I’m not sure if that would cause
> an issue given the triggering flowfile being executed at the time.
>
> Andy LoPresto
> alopresto@apache.org
> *alopresto.apache@gmail.com <al...@gmail.com>*
> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
>
> On Jun 19, 2018, at 12:04 PM, Mike Thomsen <mi...@gmail.com> wrote:
>
> Are there any APIs that could be leveraged internally be a "reset"
> processor to tell the flow file repository to purge everything?
>
> Thanks,
>
> Mike
>
>
>

Re: Progamatically clearing out flowfiles

Posted by Andy LoPresto <al...@apache.org>.
Mike,

I don’t believe there are any APIs to perform that action. You could likely achieve it by using an ExecuteStreamCommand processor and invoking “rm -rf /path/to/flowfile_repository” but I’m not sure if that would cause an issue given the triggering flowfile being executed at the time.

Andy LoPresto
alopresto@apache.org
alopresto.apache@gmail.com
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Jun 19, 2018, at 12:04 PM, Mike Thomsen <mi...@gmail.com> wrote:
> 
> Are there any APIs that could be leveraged internally be a "reset" processor to tell the flow file repository to purge everything?
> 
> Thanks,
> 
> Mike