bbende / nifi

Mirror of Apache NiFi
Apache License 2.0
1 stars 1 forks source link

Add `nifi pg-status` command #26

Closed aperepel closed 6 years ago

aperepel commented 6 years ago

Definitely need to know if the PG is currently running to invoke any operations on it.

bbende commented 6 years ago

A process group actually does not have a scheduled state, the ability to start and stop a process group is just a short-cut to call start/stop on the components under it.

Given the above, what would the desired output of this command be?

When you retrieve a pg from the REST API it has a section like this:

"runningCount" : 0,
"stoppedCount" : 2,
"invalidCount" : 0,
"disabledCount" : 0,
"activeRemotePortCount" : 0,
"inactiveRemotePortCount" : 0,
"upToDateCount" : 0,
"locallyModifiedCount" : 0,
"staleCount" : 0,
"locallyModifiedAndStaleCount" : 0,
"syncFailureCount" : 0,
"inputPortCount" : 0,
"outputPortCount" : 0

We can get this info from the CLI using pg-list with outputType of json.

Maybe we want the ability to retrieve only one PG, instead of listing all of them for a given parent? or maybe we use the states above to determine whether anything can be started?

aperepel commented 6 years ago

We could grab these stats and print in that table output. The more useful one could be the queue utilization or if backpressure is engaged on any connections.