Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-30558

The metric 'numRestarts' reported in SchedulerBase will be overridden by metric 'fullRestarts'

    XMLWordPrintableJSON

Details

    Description

      The method SchedulerBase#registerJobMetrics register metrics 'numRestarts' and 'fullRestarts' with the same metric object, as discussed in FLINK-30246, that will result in the loss of the metric 'numRestarts'.

      metrics.gauge(MetricNames.NUM_RESTARTS, numberOfRestarts); 
      metrics.gauge(MetricNames.FULL_RESTARTS, numberOfRestarts);

      I have verified this problem via rest api /jobs/:jobid/metrics, and the response shows below, we can find that the metric 'numRestarts' is missing.

      [{"id":"numberOfFailedCheckpoints"},{"id":"cancellingTime"},{"id":"lastCheckpointSize"},{"id":"totalNumberOfCheckpoints"},{"id":"lastCheckpointExternalPath"},{"id":"lastCheckpointRestoreTimestamp"},{"id":"failingTime"},{"id":"runningTime"},{"id":"uptime"},{"id":"restartingTime"},{"id":"initializingTime"},{"id":"numberOfInProgressCheckpoints"},{"id":"downtime"},{"id":"lastCheckpointProcessedData"},{"id":"numberOfCompletedCheckpoints"},{"id":"deployingTime"},{"id":"lastCheckpointFullSize"},{"id":"fullRestarts"},{"id":"createdTime"},{"id":"lastCheckpointDuration"},{"id":"lastCheckpointPersistedData"}]

      Attachments

        Issue Links

          Activity

            People

              xiasun xingbe
              xiasun xingbe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: