Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2650#discussion_r85533501
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/AbstractMetricGroup.java
---
@@ -169,19 +176,7 @@ public String getMetricIdentifier(String metricName) {
* @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);
- }
- }
-
- if (filter != null) {
- return scopeString + registry.getDelimiter() +
filter.filterCharacters(metricName);
- } else {
- return scopeString + registry.getDelimiter() +
metricName;
- }
+ return getMetricIdentifier(metricName, filter, -1);
--- End diff --
If you call `getMetricIdentifier(...)` the reporter index will be passed to
`MetricRegistry#getDelimiter()`. For a negative index this function logs a
warning, assuming that some error has occurred that caused the index to be
negative. Since you pass `-1` as the reporter index you will thus always
trigger a warning.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---