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

Metrics return empty when data stream / operator name contains "+"

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      If I submit a Flink job in which a stream has a name that contains a "+" character, the metrics returned for the stream is always empty.  For example:

      ```

      env.addSource(new TestSource()).name("testing + plus");
      ```

       

      If I try to get the metrics
      ```

      $ curl http://localhost:8081/jobs/5d4f28a221b2e5762f8404398a462eb0/vertices/cbc357ccb763df2852fee8c4fc7d55f2/metrics?get=0.Source__testing_+_plus.numRecordsOut

      []
      ```

       

      The http request is also made from the UI if you view the metric "0.Source_testing+_plus.numRecordsOut".

      The metrics will always return empty.  However if I remove the "+" from the name of the stream.  Metrics are returned non-empty.

      Maybe it has something to do with this method:

      https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/dump/MetricQueryService.java#L208

      It does not consider "+" character?

       

      I have attached the full example to reproduce the issue.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jerrypeng Boyang Jerry Peng
            jerrypeng Boyang Jerry Peng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment