Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2300#discussion_r75190837
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/AbstractMetricGroup.java
---
@@ -83,9 +88,25 @@
//
------------------------------------------------------------------------
- public AbstractMetricGroup(MetricRegistry registry, String[] scope) {
+ public AbstractMetricGroup(MetricRegistry registry, String[] scope, A
parent) {
this.registry = checkNotNull(registry);
this.scopeComponents = checkNotNull(scope);
+ this.parent = parent;
+ }
+
+ public Map<String, String> getAllVariables() {
+ if (variables == null) { // avoid synchronization for common
case
--- End diff --
Yeah, `isEmpty()` wouldn't work.
I checked my implementation and for JMX it would not be the data-processing
thread that calls ´getAllVariables()`, so this would in fact be alright. For
our current non-JMX reporters this would be done in the respective reporter
thread.
---
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.
---