GitHub user srdo opened a pull request:

    https://github.com/apache/storm/pull/2783

    [WIP] Make StormMetricsRegistry a regular class rather than a static utility

    I'd like to put this up for discussion before spending more time on it, in 
case this solution is a no go. 
    
    As mentioned on https://github.com/apache/storm/pull/2714, I think we can 
solve the issue with unintended metrics registration by making 
StormMetricsRegistry a regular class rather than a static utility. We can 
probably do something similar with StormMetricRegistry (the worker metrics 
registry) if this makes sense.
    
    The basic idea here is to initialize the metrics registry in each daemon's 
main method, and pass it around to the classes using it from there, rather than 
having the registry be a statically available tool. Metrics registration is 
moved from static initializers to regular instance fields. I also bumped the 
Metrics library version, since they've added the ability to get or add metrics, 
so we don't have to handle duplicate registrations by hand anymore.
    
    I've based this on the Java migration of Storm UI to avoid some likely 
conflicts, so please ignore everything except the last commit. 
    
    @zd-project If you have a chance, I'd appreciate your input on this since 
you've been working a lot with the metrics system recently.

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

    $ git pull https://github.com/srdo/storm non-static-metrics

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

    https://github.com/apache/storm/pull/2783.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 #2783
    
----
commit ce06bd9e3171e607b5cadfc4668424aa80bf700e
Author: Govind Menon <govindappumenon@...>
Date:   2018-05-29T19:57:41Z

    STORM-1311: UI Migration from clj to java

commit b6c01d04571a16887ec1a52c99ef657fa01d6325
Author: Govind Menon <govindappumenon@...>
Date:   2018-06-01T17:41:35Z

    STORM-1311: Using Jetty instead of Grizzly

commit ead8654cfb9c49c426e93593f002b94cd68d0a26
Author: Govind Menon <govindappumenon@...>
Date:   2018-06-27T05:17:50Z

    STORM-1311: Adding all GET routes

commit 80306a259b6bd35ec224e7dce6cbc9592daaf54e
Author: Govind Menon <govindappumenon@...>
Date:   2018-06-27T15:30:40Z

    STORM-1311: Leftover from merge

commit d4aeed52928a8c36a4b66ca6eeed6febbf982748
Author: Govind Menon <govindappumenon@...>
Date:   2018-07-05T08:20:31Z

    STORM-1311: Added rest of puts and made static file serving configuration 
generic

commit 84a64fab1944366f6747334c4e92d5eb2b685fc6
Author: Govind Menon <govindappumenon@...>
Date:   2018-07-05T08:43:18Z

    STORM-1311: Cleaning up POM files

commit d916bc8f1b1791eb3d49e7a562da357e48f2665d
Author: Govind Menon <govindappumenon@...>
Date:   2018-07-11T14:41:42Z

    STORM-1311: Added request meters, callbacks and changed packaging

commit 564e129c757152fa09be810e93c46ed0a5541938
Author: Govind Menon <govindappumenon@...>
Date:   2018-07-19T20:54:28Z

    STORM-1311: Fixing logviewer, drpc startup issues due to conflicting 
dependencies and other feedback

commit eeb8f4586e80dd555549c39e1f7d4fa5f98b1813
Author: Govind Menon <govindappumenon@...>
Date:   2018-07-23T17:55:12Z

    STORM-1311: Checkstyle

commit 396e10c12d8fab3c7ee6a9417aabcb773f22e772
Author: Govind Menon <govindappumenon@...>
Date:   2018-07-26T18:55:45Z

    STORM-1311: Moving UI Server to storm-webapp module

commit 00f2b71da03221aacf4ab1dca83ecf8f9aee6495
Author: Govind Menon <govindappumenon@...>
Date:   2018-07-27T15:42:11Z

    STORM-1311: Addressing review comments

commit 8e784b34e15d67114968c63e7745b01de0585f18
Author: Govind Menon <govindappumenon@...>
Date:   2018-07-27T23:59:06Z

    STORM-1311: Fixing Checkstlye

commit ce17be7d692580d46cff1f640493c77bb7ddc5cc
Author: Govind Menon <govindappumenon@...>
Date:   2018-07-30T16:08:33Z

    STORM-1311: Fixing RAT exclusions

commit bc3ada445df7099bdd275fecec451087e76856e6
Author: Govind Menon <govindappumenon@...>
Date:   2018-07-30T16:59:15Z

    STORM-1311: Fixing DRPC Tests

commit 290e6c744ac847d569fdaec093f01bfdd87aadb8
Author: Stig Rohde Døssing <srdo@...>
Date:   2018-07-31T13:17:23Z

    Merge branch 'STORM-1311-Jetty' of https://github.com/govind-menon/storm 
into STORM-1311-snap

commit 786f17f9aaf9dd9ccc2e6ddb01a09efaf5551166
Author: Stig Rohde Døssing <srdo@...>
Date:   2018-07-30T20:53:08Z

    Make StormMetricsRegistry non-static

----


---

Reply via email to