I use cdh-4.3.1 version. I am reading the code about metrics2. There are COUNTER and GAUGE metric type in metrics v2. What is the difference between the two?
There is @Metric MutableCounterLong bytesWritten attribute in DataNodeMetrics, which is used to statistics written bytes per second on DataNode.So I think the value of MutableCounterLong should be divided by 10and be reseted to zero per ten seconds in MutableCounterLong.snapshot method, is that right? But MutableCounterLong.snapshot method don't do that. I miss anything please tell me. Thanks, LiuLei