[jira] [Created] (FLINK-4772) Store metrics in MetricStore as strings

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-4772) Store metrics in MetricStore as strings

Shang Yuanchun (Jira)
Chesnay Schepler created FLINK-4772:
---------------------------------------

             Summary: Store metrics in MetricStore as strings
                 Key: FLINK-4772
                 URL: https://issues.apache.org/jira/browse/FLINK-4772
             Project: Flink
          Issue Type: Improvement
          Components: Metrics, Webfrontend
    Affects Versions: 1.1.2
            Reporter: Chesnay Schepler
            Assignee: Chesnay Schepler
             Fix For: 1.2.0


The MetricStore is a nested structure which stores metrics in several Map<String, Object> objects. The key is the name of the metric, while the value is the value of the metric. Since gauges are transmitted as Strings, and all other metric types are of numeric nature, the type of the value is limited to Strings and Numbers.

Storing them with different types however has no benefit, and makes working with the MetricStore needlessly complicated since one is forced to cast every retrieved metric. This also implies that one either has to know what kind of metric you're dealing with (which can easily go wrong), or check the type before using the metric, which is cumbersome.

As such i propose storing all metrics as strings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)