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.

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

Solved Go to solution
Highlighted

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

New Contributor
 
1 ACCEPTED SOLUTION

Accepted Solutions

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

Master Guru

@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.


1 REPLY 1

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

Master Guru

@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.