Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Sequential Start/Stop Apache NiFi

Sequential Start/Stop Apache NiFi

New Contributor

Hello,

I am curious if it's capable through scripting or another measure to start NiFi Processors/process groups in a specific manner.

Any help or leads will be appreciated.

 

1 REPLY 1
Highlighted

Re: Sequential Start/Stop Apache NiFi

Master Guru

@fowler7878 

 

Not sure why you would want to do this.  NiFi's design intent is to always have your processors running.

That being said, anything you can do directly on the canvas can also be accomplished via rest-api calls to the NiFi URL.  This means you could build a script that makes a series of rest-api calls via curl to start NiFi components in your desired sequence.

 

You can actually use developer tools embedded in your browser to capture the actions as you perform them in the NiFi UI and even save them as curl commands.  Using Chrome browser for example, click on the 3 dots in upper right corner.

Screen Shot 2019-10-29 at 3.30.22 PM.png

Screen Shot 2019-10-29 at 3.32.56 PM.png

Then you can perform you action in the NiFi Ui and you will see what call what rest-api request was sent to the rest-api and right click on it to get menu for saving that request as a curl command.

Screen Shot 2019-10-29 at 3.34.24 PM.png

 

There will be some unnecessary headers in the curl command that you may choose to clean out or just leave them in.

You can also access NiFi's rest-api documentation directly in  your NiFi's UI by going to the global menu and selecting "Help".  The "Rest Api" docs will be found under the "Developer" section on left hand side.

 

Hope this helps,

Matt

 

 

 

Don't have an account?
Coming from Hortonworks? Activate your account here