Skip to content

Commit

Permalink
[FLINK-30558][runtime] use different metric object to avoid metric 'n…
Browse files Browse the repository at this point in the history
…umRestarts' being overridden by 'fullRestarts' in SchedulerBase
  • Loading branch information
sunxia committed Jan 4, 2023
1 parent 1c2f4eb commit 62d5014
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -626,8 +626,8 @@ public static void registerJobMetrics(
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);
metrics.gauge(MetricNames.NUM_RESTARTS, numberOfRestarts::getValue);
metrics.gauge(MetricNames.FULL_RESTARTS, numberOfRestarts::getValue);

final JobStatusMetrics jobStatusMetrics =
new JobStatusMetrics(initializationTimestamp, jobStatusMetricsSettings);
Expand Down

0 comments on commit 62d5014

Please sign in to comment.