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

    https://github.com/apache/flink/pull/2517#discussion_r80241187
  
    --- 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
    +    * {@code "host-7.taskmanager-2.window_word_count.my-mapper.metricName"}
    +    *
    +    * @param metricName metric name
    +    * @param filter character filter which is applied to the scope 
components if not null.
    +    * @param indexReporter position number of reporter in group reporters
    --- End diff --
    
    "index of the reporter whose delimiter should be used"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to