You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2019/10/25 16:27:00 UTC
[jira] [Commented] (GEODE-7171) Encapsulate metrics session
responsibilities
[ https://issues.apache.org/jira/browse/GEODE-7171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16959905#comment-16959905 ]
ASF subversion and git services commented on GEODE-7171:
--------------------------------------------------------
Commit 95745912c14762cedb397ae97fd7d8e0f63a385f in geode's branch refs/heads/develop from Dale Emery
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=9574591 ]
GEODE-7171: Encapsulate metrics session (#4203)
Metrics session responsibilities are starting to appear in too many
parts of Geode. This change encapsulates those responsibilities into a
single class.
Changes to core Geode classes:
- GemFireCacheImpl no longer holds a meter registry or the set of "user"
registries added by the cache builder.
- InternalCacheBuilder no longer constructs objects on behalf of the
metrics session. Instead, it gathers meter registries and other
details into a MetricsService.Builder, which it passes to the
InternalDistributedSystem.Builder.
- InternalDistributedSystem no longer knows about client meter
registries. Instead, it holds a MetricsService, which remembers its
builder. During reconnect, the InternalDistributedSystem retrieves
the builder from its metrics service, and uses the builder to build
a similar metrics service in the reconnected system.
New classes and interfaces (org.apache.geode.metrics.internal):
- StandardMeterBinder
- Binds standard meter binders to the meter registry.
- close() closes the closeable binders, freeing their resources.
- MetricsService interface
- Extends MetricsSession.
- Adds methods to start and stop the service, and to access the
service's meter registry.
- Adds a method that returns the builder that built the metrics
service, so that reconnect can use the same builder to build the
metrics service for the reconnected system.
- InternalDistributedSystemMetricsService
- Implements MetricsService.
- Creates and retains a composite meter registry to manage meters.
- Configures the composite composite registry:
- Adds common tags that describe the system
- Adds client meter registries to the composite.
- Applies a StandardMeterBinder to add standard meters to the
registry.
- Discovers, starts, and stops metrics publishing services.
- Adds and removes sub-registries as instructed by publishing
services.
- When stopped, stops each publishing service, closes all closeable
meter binders, removes all sub-registries, and closes its composite
meter registry.
- MetricsService.Builder interface
- InternalDistriburtedSystemMetricsService.Builder
- Implements MetricsService.Builder
- Accumulates and retains constructor parameters for the eventual
InternalDistributedSystemMetricsService.
- In particular, maintains a collection of meter registries added by
the cache builder. It calls these 'persistent' registries, because
they will persist across reconnects.
Other changes:
- Added MetricsSession parameter to MetricsPublishingService.stop().
Authored-by: Dale Emery <de...@pivotal.io>
> Encapsulate metrics session responsibilities
> --------------------------------------------
>
> Key: GEODE-7171
> URL: https://issues.apache.org/jira/browse/GEODE-7171
> Project: Geode
> Issue Type: Improvement
> Components: statistics
> Reporter: Dale Emery
> Priority: Major
> Time Spent: 3.5h
> Remaining Estimate: 0h
>
> Too many parts of Geode are starting to know too much about the details of a metrics session. We should encapsulate metrics session details and provide appropriate methods to interact with the session.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)