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
Implementation of
MetricFetcher which fetches metrics from the MetricQueryServiceGateway.-
Constructor Summary
ConstructorsConstructorDescriptionMetricFetcherImpl(GatewayRetriever<T> retriever, MetricQueryServiceRetriever queryServiceRetriever, Executor executor, Duration timeout, long updateInterval) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends RestfulGateway>
MetricFetcherImpl<T>fromConfiguration(org.apache.flink.configuration.Configuration configuration, MetricQueryServiceRetriever metricQueryServiceGatewayRetriever, GatewayRetriever<T> dispatcherGatewayRetriever, ExecutorService executor) longReturns 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 Details
-
MetricFetcherImpl
public MetricFetcherImpl(GatewayRetriever<T> retriever, MetricQueryServiceRetriever queryServiceRetriever, Executor executor, Duration timeout, long updateInterval)
-
-
Method Details
-
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)
-