use of org.apache.flink.runtime.scheduler.metrics.JobStatusMetrics in project flink by apache.
the class SchedulerBase method registerJobMetrics.
public static void registerJobMetrics(MetricGroup metrics, JobStatusProvider jobStatusProvider, Gauge<Long> numberOfRestarts, DeploymentStateTimeMetrics deploymentTimeMetrics, Consumer<JobStatusListener> jobStatusListenerRegistrar, long initializationTimestamp, MetricOptions.JobStatusMetricsSettings jobStatusMetricsSettings) {
metrics.gauge(DownTimeGauge.METRIC_NAME, new DownTimeGauge(jobStatusProvider));
metrics.gauge(UpTimeGauge.METRIC_NAME, new UpTimeGauge(jobStatusProvider));
metrics.gauge(MetricNames.NUM_RESTARTS, numberOfRestarts);
metrics.gauge(MetricNames.FULL_RESTARTS, numberOfRestarts);
final JobStatusMetrics jobStatusMetrics = new JobStatusMetrics(initializationTimestamp, jobStatusMetricsSettings);
jobStatusMetrics.registerMetrics(metrics);
jobStatusListenerRegistrar.accept(jobStatusMetrics);
deploymentTimeMetrics.registerMetrics(metrics);
}
Aggregations