Class MetricFetcherImpl<T extends RestfulGateway>
- java.lang.Object
-
- org.apache.flink.runtime.rest.handler.legacy.metrics.MetricFetcherImpl<T>
-
- Type Parameters:
T- type of theRestfulGatewayfrom which to retrieve the metric query service path.
- All Implemented Interfaces:
MetricFetcher
public class MetricFetcherImpl<T extends RestfulGateway> extends Object implements MetricFetcher
Implementation ofMetricFetcherwhich fetches metrics from theMetricQueryServiceGateway.
-
-
Constructor Summary
Constructors Constructor Description MetricFetcherImpl(GatewayRetriever<T> retriever, MetricQueryServiceRetriever queryServiceRetriever, Executor executor, Duration timeout, long updateInterval)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends RestfulGateway>
MetricFetcherImpl<T>fromConfiguration(org.apache.flink.configuration.Configuration configuration, MetricQueryServiceRetriever metricQueryServiceGatewayRetriever, GatewayRetriever<T> dispatcherGatewayRetriever, ExecutorService executor)longgetLastUpdateTime()MetricStoregetMetricStore()Returns the MetricStore containing all stored metrics.voidupdate()This method can be used to signal this MetricFetcher that the metrics are still in use and should be updated.
-
-
-
Constructor Detail
-
MetricFetcherImpl
public MetricFetcherImpl(GatewayRetriever<T> retriever, MetricQueryServiceRetriever queryServiceRetriever, Executor executor, Duration timeout, long updateInterval)
-
-
Method Detail
-
getMetricStore
public MetricStore getMetricStore()
Returns the MetricStore containing all stored metrics.- Specified by:
getMetricStorein interfaceMetricFetcher- Returns:
- MetricStore containing all stored metrics;
-
update
public void update()
This method can be used to signal this MetricFetcher that the metrics are still in use and should be updated.- Specified by:
updatein interfaceMetricFetcher
-
getLastUpdateTime
public long getLastUpdateTime()
- Specified by:
getLastUpdateTimein interfaceMetricFetcher- Returns:
- timestamp of the last update.
-
fromConfiguration
@Nonnull public static <T extends RestfulGateway> MetricFetcherImpl<T> fromConfiguration(org.apache.flink.configuration.Configuration configuration, MetricQueryServiceRetriever metricQueryServiceGatewayRetriever, GatewayRetriever<T> dispatcherGatewayRetriever, ExecutorService executor)
-
-