Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the use of NiFi Counters?

I didn't find any documentation related to nifi counters.I Want to know how to use this feature and purpose of this feature.

like image 578
Manoj Avatar asked Sep 06 '16 06:09

Manoj


1 Answers

Counters are a way for a processor to track how many times some event occurred, mostly for monitoring purposes. There is a method in the ProcessSession:

void adjustCounter(String name, long delta, boolean immediate);

So calling this method with ("myCounter", 1, true) would increment the count of "myCounter" by 1, or create the counter if it didn't exist. Counters are not persistent and will be reset on restart. An example is in the syslog processors which increment a counter for each syslog message received.

See discussion here:

https://community.hortonworks.com/questions/50622/apache-nifi-what-are-counters-in-nifi.html

like image 99
Bryan Bende Avatar answered Sep 22 '22 17:09

Bryan Bende