[ 
https://issues.apache.org/jira/browse/KAFKA-2588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14972752#comment-14972752
 ] 

Gwen Shapira commented on KAFKA-2588:
-------------------------------------

I'm trying to follow your logic and failing...

You mentioned "The metric (aggregated) would show..."

But this is a per-broker metric, and I'm not sure it makes sense to aggregate. 

PartitionCount shows number of partitions served by the broker. This number is 
fixed (unless someone  reassigns) and since each partition takes certain number 
of resources (mostly memory and file handles), and since each partition can 
potentially become leader or follower, it is pretty important to have this 
number. 

LeaderCount on a broker can change and is a good proxy for how loaded a broker 
is at the moment.

So, long way of saying - I think you are a bit confused because you are trying 
to aggregate cluster-wide two metrics that are built for monitoring load on 
specific brokers and were not written to make sense when aggregated at cluster 
level.




> ReplicaManager partitionCount metric should actually be replicaCount
> --------------------------------------------------------------------
>
>                 Key: KAFKA-2588
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2588
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.8.2.1
>            Reporter: Grant Henke
>            Assignee: Grant Henke
>
> The metrics "partitionCount" in the ReplicaManager actually represents the 
> count of replicas. 
> As an example if I have a cluster with 1 topic with 1 partitions and a 
> replication factor of 3. The metric (aggregated) would show a value of 3. 
> There is a metric called "LeaderCount" that actually represents the 
> "partitionCount". In my example above the metric (aggregated) would show a 
> value of 1. 
> We do need to consider compatibility of consuming systems. I think the most 
> simple change would be to:
> - Adjust the "partitionCount" metric to be the same value as "LeaderCount"
> - Add a "replicaCount" metric which contains the values "partitionCount" does 
> today
> - Leave "LeaderCount" in for compatibility
> Documentation will need to be updated as well. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to