[ 
https://issues.apache.org/jira/browse/FLINK-4564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15516438#comment-15516438
 ] 

ASF GitHub Bot commented on FLINK-4564:
---------------------------------------

Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2517#discussion_r80241086
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/AbstractMetricGroup.java
 ---
    @@ -168,21 +168,40 @@ public String getMetricIdentifier(String metricName) {
         * @param filter character filter which is applied to the scope 
components if not null.
         * @return fully qualified metric name
         */
    -   public String getMetricIdentifier(String metricName, CharacterFilter 
filter) {
    -           if (scopeString == null) {
    -                   if (filter != null) {
    -                           scopeString = ScopeFormat.concat(filter, 
registry.getDelimiter(), scopeComponents);
    -                   } else {
    -                           scopeString = 
ScopeFormat.concat(registry.getDelimiter(), scopeComponents);
    -                   }
    +   public String getMetricIdentifier(String metricName,CharacterFilter 
filter) {
    +           if (filter != null){
    +                   scopeString = ScopeFormat.concat(filter, 
registry.getDelimiter(), scopeComponents);
    +           } else {
    +                   scopeString = 
ScopeFormat.concat(registry.getDelimiter(), scopeComponents);
                }
    -
    -           if (filter != null) {
    +           if (filter != null){
                        return scopeString + registry.getDelimiter() + 
filter.filterCharacters(metricName);
                } else {
                        return scopeString + registry.getDelimiter() + 
metricName;
                }
        }
    +
    +   /**
    +    * Returns the fully qualified metric name for reporter with certain 
number position in group, for example
    --- End diff --
    
    the javadoc should say "Returns the fully qualified metric name using the 
configured delimiter for the reporter with the given index.


> [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
(v6.3.4#6332)

Reply via email to