Hi,

Can someone help me understand the usage of CounterGroup class. Can
see its usage for collecting metrics, but how is it reported (via
logging only?) The usage is also not consistent across Sources/Sinks,
like Avro source doesn't use, neither does HDFS/Kafka sinks.

The class has all the methods as synchronized. The only time it is
needed is while adding the counter to the map, rest synchronisation is
handled by AtomicLong class. We can register the counters while
initializing the class and get rid of synchronized clause from class.
It's not a big issue, AFAIK JVM would anyways be optimising it during
runtime.

Thoughts?

-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal

Reply via email to