GitHub user eolivelli reopened a pull request:
https://github.com/apache/zookeeper/pull/601
ZOOKEEPER-3123 MetricsProvider Lifecycle in ZooKeeper Server
Manage the lifecycle of a MetricsProvider inside a ZooKeeper server.
- handle configuration
- start and configure the MetricsProvider
- notify shutdown to the MetricsProvider
This is an early preview, because there are some points to discuss:
- We have to throw an IOException in case of failure (in order not to
change the current signature of main methods used to start the server)
- The patch only provides the lifecycle, it introduces some dead fields
(root metrics context), this is expected as the real instrumentation will be
done in a further step, is it okay ?
- Test cases cover only standalone mode, do we need to add a new suite for
testing configuration and boot errors on QuorumPeer mode ? (the answer should
be YES)
- MetricsProvider configuration is not subject to dynamic 'reconfig'
Configuration to the MetricsProvider is not yet handled, the idea is to let
the user configure properties like
metricsProvider.className=o.a.z.metrics.prometheus.PrometheusMetricsProvider
metricsProvider.customParam1=value1
metricsProvider.customParam2=value2
in this case the MetricsProvider will receive {customParam1=value1,
customParam2=value2} as parameter in configure()
is it okay ?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/eolivelli/zookeeper fix/boot-provider
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zookeeper/pull/601.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 #601
----
commit f4f66ecb8b9371299d965569e64b2db37ab2d5bd
Author: Enrico Olivelli <eolivelli@...>
Date: 2018-08-17T13:08:59Z
ZOOKEEPER-3123 MetricsProvider Lifecycle in ZooKeeper Server
commit c92450e4ee39c1e38ef75f11af4cedc6e28dba04
Author: Enrico Olivelli <eolivelli@...>
Date: 2018-08-27T14:44:39Z
implement MetricsProvider configuration, fix some review comments
commit 22f79eb84f6ceed53bbc0f5c76566e662e5772a3
Author: Enrico Olivelli <eolivelli@...>
Date: 2018-08-27T14:52:40Z
clean up
commit 7ad552dbdab36c4ce02b72339782b50847fa6f03
Author: Enrico Olivelli <eolivelli@...>
Date: 2018-08-31T22:38:05Z
Add testcases around QuorumPeerMain
commit 93749f6a5076d7498c2abdbd570871092d533684
Author: Enrico Olivelli <eolivelli@...>
Date: 2018-08-31T22:46:57Z
fix imports
commit 8964ed17bf44ade0d6af0255ef4e241bed70125b
Author: Enrico Olivelli <eolivelli@...>
Date: 2018-09-01T10:37:08Z
Fix tests, use getters in order to support Mock QuorumPeerConfig
----
---