Matt,
I tried it:
curl -i -X PUT -H 'Content-Type: application/json' -d
'{"revision":{"clientId":"561b4443-8be5-43ee-b1f7-b07740e87a0f"},"processor":{"id":"fad172d5-5d29-4a8b-923f-e888af039c52","state":"STOPPED"}}'
http://localhost:8080/nifi-api/controller/process-groups/42cb10e8-1856-4155-9aa2-bef736bf330e/processors/fad172d5-5d29-4a8b-923f-e888af039c52
This is the response i am getting:
HTTP/1.1 409 Conflict
Date: Sat, 12 Mar 2016 18:22:34 GMT
Content-Type: text/plain
Transfer-Encoding: chunked
Server: Jetty(9.2.11.v20150529)
This NiFi instance has been updated by 'anonymous'. Please refresh to
synchronize the view
But it did not stop the processor.
Please provide some suggesstions
Regards,
Sourav Gulati
Big Data
________________________________________
From: Matt Gilman <[email protected]>
Sent: Friday, March 11, 2016 8:00 PM
To: [email protected]
Subject: Re: Reg: starting and Stopping processor
Sourav,
The command would like the following with substituting the relevant values.
curl -i -X PUT -H 'Content-Type: application/json' -d
'{"revision":{"version":<current-revision-version>,"clientId":"<your-client-id>"},"processor":{"id":"d6d28ec3-75c8-4194-b171-79c3e813f7e3","state":"STOPPED"}}'
http://localhost:8080/nifi-api/controller/process-groups/92e70e95-31c4-4eb3-beab-e6fd411378bd/processors/d6d28ec3-75c8-4194-b171-79c3e813f7e3
Also, check out this blog post that describes how NiFi uses optimistic
locking to know when another user has modified the data flow [1]. The
bottom contains a great sequence diagram describing the necessary values.
Matt
[1]
https://community.hortonworks.com/content/kbentry/3160/update-nifi-flow-on-the-fly-via-api.html
On Thu, Mar 10, 2016 at 11:57 PM, Sourav Gulati <[email protected]
> wrote:
> Hi Team,
>
> Is there a way to start and stop processor using some rest api or command
> line ? If yes, please provide the steps.
>
> Regards,
> Sourav Gulati
>
>
> ________________________________
>
>
>
>
>
>
> NOTE: This message may contain information that is confidential,
> proprietary, privileged or otherwise protected by law. The message is
> intended solely for the named addressee. If received in error, please
> destroy and notify the sender. Any use of this email is prohibited when
> received in error. Impetus does not represent, warrant and/or guarantee,
> that the integrity of this communication has been maintained nor that the
> communication is free of errors, virus, interception or interference.
>
________________________________
NOTE: This message may contain information that is confidential, proprietary,
privileged or otherwise protected by law. The message is intended solely for
the named addressee. If received in error, please destroy and notify the
sender. Any use of this email is prohibited when received in error. Impetus
does not represent, warrant and/or guarantee, that the integrity of this
communication has been maintained nor that the communication is free of errors,
virus, interception or interference.