I am sure there are many ways to skin this cat. Here are a few ideas
-Use core base rowCounter
org.apache.hadoop.hbase.mapreduce.RowCounter
Usage: RowCounter [options]
<tablename> [
--starttime=[start]
--endtime=[end]
[--range=[startKey],[endKey]]
[<column1> <column2>...]
]
-Store NiFi counter in HBase table
-Use hbase coprocessor. This will give you max flexibility. Think of database triggers. Some logic you want to executor per record. Be careful with performance. If you are looking to super fast write times, the triggers may have some side effect