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

ASF GitHub Bot commented on KAFKA-2689:
---------------------------------------

GitHub user enothereska opened a pull request:

    https://github.com/apache/kafka/pull/363

    KAFKA-2689: Expose select gauges and metrics programmatically (not just 
through JMX)

    For now just exposing the replica manager gauges.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/enothereska/kafka kafka-2689

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/363.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #363
    
----
commit 90c0085a76374fafe6fa62c18e3d24504852e687
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-07T00:06:49Z

    Commits to fix timing issues in three JIRAs

commit ee66491fb36d55527d156afda90c3addc3eb3175
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-07T00:07:21Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit 17a373733e414456475217248cbc7b0bc98fda40
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-07T15:15:19Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit eb5fbf458a5b455ae8b3c8b3ebf32524f5a3ab3e
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-07T16:20:45Z

    Removed debug messages

commit 041baae45012cf8f99afd2c8b5d9a8099a8a928b
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-07T17:35:12Z

    Pick a node, but not one that is blacked out

commit 69679d7e61d36f76d2ea1dd1fcc0a1192c9b50d6
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-08T17:18:02Z

    Removed unneeded checks

commit 3ce5e151396575f45d1f022720f454ac36653d0d
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-08T17:18:18Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit 76e6a0d8ab3fe847b28edde2e0072e7fe06484ff
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-08T23:35:41Z

    More efficient implementation of nodesEverSeen

commit 6576f372e0cddcc54b6fcb19b9d471cff16bcd77
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-10T19:04:54Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit 0f9507310812740d1a8304c6350f434b5a661c63
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-12T21:33:52Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit b7c4c3c1600a6e21884dbcb39588a0681d351d60
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-16T08:47:35Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit f6bd8788f0e6088ad81fd2847b999e3b0d4ecd2c
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-16T10:39:25Z

    Fixed handling of now. Added unit test for leastLoadedNode. Fixed 
disconnected method in MockSelector

commit b5f4c1796894de5b0c4cc31b7de98eb4536c0ccf
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-17T19:53:15Z

    Check case when node with same broker id has different host or port

commit bee1d583fa67d944e40ec700d0212c1bac314703
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-17T19:53:30Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit bdf2fcf29d5396b97b9a24bf962a7c40b6a795c6
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-19T21:26:46Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit d612afe2fd7ce63b054d2406e8d82419b3b39841
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-19T21:30:33Z

    Removed unnecessary Map remove

commit ba5eafcfeb006c403e7047c45442eca0d9ec763a
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-20T07:59:03Z

    Cleaned up parts of code. Minor.

commit 65e3aee2c9491b0411672eaf568034160b331074
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-20T07:59:19Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit 4ab54e061a1708d086f7720dc40778cdaf0d0362
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-20T10:03:14Z

    More cleanup. Minor

commit 570c15ff8032248018cc8c5a7f0df75d840a898f
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-21T08:35:24Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit 2a1f1a6cd350d2e655e5a0b41d66fca8f0af5782
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-21T20:02:38Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit 285bd1c0d8830e0e89ec49716b639156d291ace6
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-23T17:40:14Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit d33199d5d32e7fc2f22e4fa64b505f15427d5be0
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-26T12:44:21Z

    Merge remote-tracking branch 'apache-kafka/trunk' into trunk

commit ff6c0cf771f4deab83ba603e447840cfa4a87a29
Author: Eno Thereska <eno.there...@gmail.com>
Date:   2015-10-26T19:46:46Z

    Exporting metrics.

----


> Expose select gauges and metrics programmatically (not just through JMX)
> ------------------------------------------------------------------------
>
>                 Key: KAFKA-2689
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2689
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.9.0.0
>            Reporter: Eno Thereska
>            Assignee: Eno Thereska
>              Labels: newbie
>             Fix For: 0.9.0.0
>
>
> There are several gauges in core that are registered but cannot be accessed 
> programmatically. For example, gauges "LeaderCount", "PartitionCount", 
> "UnderReplicatedParittions" are all registered in ReplicaManager.scala but 
> there is no way to access them programmatically if one has access to the 
> kafka.server object. Other metrics,  such as isrExpandRate (also in 
> ReplicaManager.scala) can be accessed. The solution here is trivial, add a 
> var <variable name> in front of newGauge, as shown below
> var partitionCount newGauge(
>     "PartitionCount",
>     new Gauge[Int] {
>       def value = allPartitions.size
>     }
> )



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

Reply via email to