public class MetricRegistryImpl extends Object implements MetricRegistry
Metrics. It serves as the
connection between MetricGroups and MetricReporters.| Constructor and Description |
|---|
MetricRegistryImpl(MetricRegistryConfiguration config)
Creates a new MetricRegistry and starts the configured reporter.
|
| Modifier and Type | Method and Description |
|---|---|
char |
getDelimiter()
Returns the global delimiter.
|
char |
getDelimiter(int reporterIndex)
Returns the configured delimiter for the reporter with the given index.
|
String |
getMetricQueryServicePath()
Returns the address under which the
MetricQueryService is reachable. |
int |
getNumberReporters()
Returns the number of registered reporters.
|
akka.actor.ActorRef |
getQueryService() |
List<org.apache.flink.metrics.reporter.MetricReporter> |
getReporters() |
ScopeFormats |
getScopeFormats()
Returns the scope formats.
|
boolean |
isShutdown()
Returns whether this registry has been shutdown.
|
void |
register(org.apache.flink.metrics.Metric metric,
String metricName,
AbstractMetricGroup group)
Registers a new
Metric with this registry. |
CompletableFuture<Void> |
shutdown()
Shuts down this registry and the associated
MetricReporter. |
void |
startQueryService(akka.actor.ActorSystem actorSystem,
ResourceID resourceID)
Initializes the MetricQueryService.
|
void |
unregister(org.apache.flink.metrics.Metric metric,
String metricName,
AbstractMetricGroup group)
Un-registers the given
Metric with this registry. |
public MetricRegistryImpl(MetricRegistryConfiguration config)
public void startQueryService(akka.actor.ActorSystem actorSystem,
ResourceID resourceID)
actorSystem - ActorSystem to create the MetricQueryService onresourceID - resource ID used to disambiguate the actor name@Nullable public String getMetricQueryServicePath()
MetricQueryService is reachable.getMetricQueryServicePath in interface MetricRegistrypublic char getDelimiter()
MetricRegistrygetDelimiter in interface MetricRegistrypublic char getDelimiter(int reporterIndex)
MetricRegistrygetDelimiter in interface MetricRegistryreporterIndex - index of the reporter whose delimiter should be usedpublic int getNumberReporters()
MetricRegistrygetNumberReporters in interface MetricRegistry@VisibleForTesting public List<org.apache.flink.metrics.reporter.MetricReporter> getReporters()
public boolean isShutdown()
public CompletableFuture<Void> shutdown()
MetricReporter.
NOTE: This operation is asynchronous and returns a future which is completed once the shutdown operation has been completed.
MetricRegistryImpl
is shut down.public ScopeFormats getScopeFormats()
MetricRegistrygetScopeFormats in interface MetricRegistrypublic void register(org.apache.flink.metrics.Metric metric,
String metricName,
AbstractMetricGroup group)
MetricRegistryMetric with this registry.register in interface MetricRegistrymetric - the metric that was addedmetricName - the name of the metricgroup - the group that contains the metricpublic void unregister(org.apache.flink.metrics.Metric metric,
String metricName,
AbstractMetricGroup group)
MetricRegistryMetric with this registry.unregister in interface MetricRegistrymetric - the metric that should be removedmetricName - the name of the metricgroup - the group that contains the metric@VisibleForTesting @Nullable public akka.actor.ActorRef getQueryService()
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.