public class MetricQueryService extends RpcEndpoint implements MetricQueryServiceGateway
It is realized as an actor and can be notified of
- an added metric by calling addMetric(String, Metric, AbstractMetricGroup)
- a removed metric by calling removeMetric(Metric)
- a metric dump request by calling queryMetrics(Time)
RpcEndpoint.MainThreadExecutor| Modifier and Type | Field and Description |
|---|---|
static String |
METRIC_QUERY_SERVICE_NAME |
log, rpcServer| Constructor and Description |
|---|
MetricQueryService(RpcService rpcService,
String endpointId,
long messageSizeLimit) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMetric(String metricName,
org.apache.flink.metrics.Metric metric,
AbstractMetricGroup group) |
static MetricQueryService |
createMetricQueryService(RpcService rpcService,
ResourceID resourceID,
long maximumFrameSize)
Starts the MetricQueryService actor in the given actor system.
|
CompletableFuture<Void> |
onStop()
User overridable callback which is called from
RpcEndpoint.internalCallOnStop(). |
CompletableFuture<MetricDumpSerialization.MetricSerializationResult> |
queryMetrics(org.apache.flink.api.common.time.Time timeout) |
void |
removeMetric(org.apache.flink.metrics.Metric metric) |
callAsync, closeAsync, getAddress, getEndpointId, getHostname, getMainThreadExecutor, getRpcService, getSelfGateway, getTerminationFuture, internalCallOnStart, internalCallOnStop, isRunning, onStart, runAsync, scheduleRunAsync, scheduleRunAsync, start, stop, validateRunsInMainThreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAddress, getHostnamepublic static final String METRIC_QUERY_SERVICE_NAME
public MetricQueryService(RpcService rpcService, String endpointId, long messageSizeLimit)
public CompletableFuture<Void> onStop()
RpcEndpointRpcEndpoint.internalCallOnStop().
This method is called when the RpcEndpoint is being shut down. The method is guaranteed to be executed in the main thread context and can be used to clean up internal state.
IMPORTANT: This method should never be called directly by the user.
onStop in class RpcEndpointpublic void addMetric(String metricName, org.apache.flink.metrics.Metric metric, AbstractMetricGroup group)
public void removeMetric(org.apache.flink.metrics.Metric metric)
public CompletableFuture<MetricDumpSerialization.MetricSerializationResult> queryMetrics(org.apache.flink.api.common.time.Time timeout)
queryMetrics in interface MetricQueryServiceGatewaypublic static MetricQueryService createMetricQueryService(RpcService rpcService, ResourceID resourceID, long maximumFrameSize)
rpcService - The rpcService running the MetricQueryServiceresourceID - resource ID to disambiguate the actor nameCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.