Search in sources :

Example 1 with JobStatusMetrics

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);
}
Also used : DownTimeGauge(org.apache.flink.runtime.executiongraph.metrics.DownTimeGauge) UpTimeGauge(org.apache.flink.runtime.executiongraph.metrics.UpTimeGauge) JobStatusMetrics(org.apache.flink.runtime.scheduler.metrics.JobStatusMetrics)

Aggregations

DownTimeGauge (org.apache.flink.runtime.executiongraph.metrics.DownTimeGauge)1 UpTimeGauge (org.apache.flink.runtime.executiongraph.metrics.UpTimeGauge)1 JobStatusMetrics (org.apache.flink.runtime.scheduler.metrics.JobStatusMetrics)1