GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/2300

    [FLINK-4245] Expose all possible variables

    This PR allows users and reporters to access a `Map<String, String>` of all 
defined variables and their associated values via 
`MetricGroup#getAllVariables()`.
    
    The following changes were made:
    * Every `AbstractMetricGroup` now has a parent field (previously, each 
`ComponentMetricGroup` had it's own field). For proper typing, both of these 
now have a generic type argument, denoting the type of the parent. 
     * For example: `TaskMetricGroup extends 
ComponentMetricGroup<TaskManagerJobMetricGroup>`
     * most super() calls had to be adjusted to pass the parent as well
    * The method `Map<String, String> getAllVariables()` was added to the 
`MetricGroup` interface
     * Non-`ComponentMetricGroup` implementations always forward the call to 
the parent or return an empty map.
     * A `ComponentMetricGroup` creates a new `HashMap` (if it wasn't created 
before), enters it's own variables (see next item), and adds the values 
returned by `parent.getAllVariables()`
    * The method `protected void putVariables(Map<String, String> variables)` 
was added to the `ComponentMetricGroup` class.
     * In this method the group adds it's varaibles and values into the map
    * The map is lazily computed.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zentol/flink metrics_tags

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2300.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2300
    
----
commit a0d7b8bc7a518f981da91570f5b20f2d09a095eb
Author: zentol <[email protected]>
Date:   2016-07-27T09:25:27Z

    [FLINK-4245] Expose all possible variables

----


---
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.
---

Reply via email to