public class MetricRegistryImpl extends Object implements MetricRegistry
Metrics. It serves as the
connection between MetricGroups and MetricReporters.| 构造器和说明 |
|---|
MetricRegistryImpl(MetricRegistryConfiguration config) |
MetricRegistryImpl(MetricRegistryConfiguration config,
Collection<ReporterSetup> reporterConfigurations)
Creates a new MetricRegistry and starts the configured reporter.
|
| 限定符和类型 | 方法和说明 |
|---|---|
char |
getDelimiter()
Returns the global delimiter.
|
String |
getMetricQueryServiceGatewayRpcAddress()
Returns the address under which the
MetricQueryService is reachable. |
org.apache.flink.runtime.rpc.RpcService |
getMetricQueryServiceRpcService()
Returns the rpc service that the
MetricQueryService runs in. |
int |
getNumberReporters()
Returns the number of registered reporters.
|
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(org.apache.flink.runtime.rpc.RpcService rpcService,
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 MetricRegistryImpl(MetricRegistryConfiguration config, Collection<ReporterSetup> reporterConfigurations)
public void startQueryService(org.apache.flink.runtime.rpc.RpcService rpcService,
ResourceID resourceID)
rpcService - RpcService to create the MetricQueryService onresourceID - resource ID used to disambiguate the actor name@Nullable public org.apache.flink.runtime.rpc.RpcService getMetricQueryServiceRpcService()
MetricQueryService runs in.@Nullable public String getMetricQueryServiceGatewayRpcAddress()
MetricQueryService is reachable.getMetricQueryServiceGatewayRpcAddress 在接口中 MetricRegistrypublic char getDelimiter()
MetricRegistrygetDelimiter 在接口中 MetricRegistrypublic int getNumberReporters()
MetricRegistrygetNumberReporters 在接口中 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 在接口中 MetricRegistrypublic void register(org.apache.flink.metrics.Metric metric,
String metricName,
AbstractMetricGroup group)
MetricRegistryMetric with this registry.register 在接口中 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 在接口中 MetricRegistrymetric - the metric that should be removedmetricName - the name of the metricgroup - the group that contains the metricCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.