Pushkar,

NiFi employs an optimistic locking scheme that requires clients to pass in
a revision when making a mutable request. The revision is comprised of a
version (a number that increments with each modification) and a client id.
The client id can be any string. You should continue to use this client id
with all subsequent requests. In order for a mutable request to be
accepted, a client must either have the current version or the client id
that last modified the flow. The second check allows clients to submit
requests asynchronous without having to wait for preceding requests to
complete. There is a good sequence diagram showing this at the bottom of
this article [1].

Each component will have its own revision. You should be able to obtain the
current revision from /connections/{id} or when obtaining the flow for a
given Process Group (/flow/process-groups/{id}).

Matt

[1]
https://community.hortonworks.com/content/kbentry/3160/update-nifi-flow-on-the-fly-via-api.html

On Fri, Mar 24, 2017 at 1:11 PM, Pushkara R <pushkar1...@gmail.com> wrote:

> Hi,
>
> I am writing a client for NiFi in python that will be used as a library to
> dynamically change the processor arrangement and attributes.
>
> I have a question regarding the DELETE method for the /connections/{id}
> resource. The method expects query string fields for version and clientid.
> Could somebody elaborate on what these fields mean and where can my client
> retrieve them before doing a DELETE method call?
>
> Thanks
> Pushkar
>

Reply via email to