Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How do you run cmd commands for NiFi to execute processors?

avatar
New Contributor
 
1 ACCEPTED SOLUTION

avatar
Super Mentor

@TRACEY JACKSON

NiFi processors are configurable to run using a Timer Driven or Cron Driven scheduling strategy. This scheduling can uniquely configured per each processors configuration. Processors are then started and the operate based on the configured scheduler from that point forward.

-

The NiFi API can be used to perform any action a user can perform directly from the UI. The best way to learn the rest-api calls is to use the "Developer tools" available via most browsers.
-

While focused on tab where NiFi UI is open, launch the developers tools.

Chrome Browser example:

107352-screen-shot-2019-03-21-at-94520-am.png

107371-screen-shot-2019-03-21-at-94854-am.png

Then perform the action via the NiFi UI and you will see the "Network" call display in list.

You can right click on that call and select "Copy as curl".
Now you have an example of how to execute that same request via command line.

107372-screen-shot-2019-03-21-at-95243-am.png

-

For more info in the NIFi rest-api, you can look in "help" found within the NiFi UI Global menu (upper right corner). The Rest Api documentation can be found in the "Developer" section at bottom of list on far left side of help UI.

-

The danger with trying to "run" dataflows in NiFi via command line is you may end up stopping processors in the dataflow chain that results in FlowFile being unprocessed and sitting on connection queues between processors.

-

Thank you,
Matt

-

If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.


View solution in original post

1 REPLY 1

avatar
Super Mentor

@TRACEY JACKSON

NiFi processors are configurable to run using a Timer Driven or Cron Driven scheduling strategy. This scheduling can uniquely configured per each processors configuration. Processors are then started and the operate based on the configured scheduler from that point forward.

-

The NiFi API can be used to perform any action a user can perform directly from the UI. The best way to learn the rest-api calls is to use the "Developer tools" available via most browsers.
-

While focused on tab where NiFi UI is open, launch the developers tools.

Chrome Browser example:

107352-screen-shot-2019-03-21-at-94520-am.png

107371-screen-shot-2019-03-21-at-94854-am.png

Then perform the action via the NiFi UI and you will see the "Network" call display in list.

You can right click on that call and select "Copy as curl".
Now you have an example of how to execute that same request via command line.

107372-screen-shot-2019-03-21-at-95243-am.png

-

For more info in the NIFi rest-api, you can look in "help" found within the NiFi UI Global menu (upper right corner). The Rest Api documentation can be found in the "Developer" section at bottom of list on far left side of help UI.

-

The danger with trying to "run" dataflows in NiFi via command line is you may end up stopping processors in the dataflow chain that results in FlowFile being unprocessed and sitting on connection queues between processors.

-

Thank you,
Matt

-

If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.