ASF GitHub Bot commented on FLINK-4564:

Github user ex00 commented on the issue:

    Could you explain me how must look API for getting metric identifier?
    Now I think  about this:
    public void testConfigurableDelimiterForReporter() {
                Configuration config = new Configuration();
                config.setString(ConfigConstants.METRICS_SCOPE_DELIMITER, ".");
                config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + 
"test1." + ConfigConstants.METRICS_REPORTER_SCOPE_DELIMITER, "_");
                config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + 
"test1." + ConfigConstants.METRICS_REPORTER_CLASS_SUFFIX, 
                MetricRegistry registry = new MetricRegistry(config);
                TaskManagerMetricGroup tmGroup = new 
TaskManagerMetricGroup(registry, "host", "id");
tmGroup.getMetricIdentifier("name")); //get default delimiter for all
tmGroup.getMetricIdentifier("name",null,1)); //get delimiter for first reporter 
in list

> [metrics] Delimiter should be configured per reporter
> -----------------------------------------------------
>                 Key: FLINK-4564
>                 URL: https://issues.apache.org/jira/browse/FLINK-4564
>             Project: Flink
>          Issue Type: Bug
>          Components: Metrics
>    Affects Versions: 1.1.0
>            Reporter: Chesnay Schepler
>            Assignee: Anton Mushin
> Currently, the delimiter used or the scope string is based on a configuration 
> setting shared by all reporters. However, different reporters may have 
> different requirements in regards to the delimiter, as such we should allow 
> reporters to use a different delimiter.
> We can keep the current setting as a global setting that is used if no 
> specific setting was set.

This message was sent by Atlassian JIRA

Reply via email to