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

Elek, Marton commented on HDDS-910:
-----------------------------------

I just learned that @Metrics annotations also could be used on methods:

https://github.com/apache/hadoop/blob/ccaf036662e22da14583942054898c99fa51dae5/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MetricsSourceBuilder.java#L71

So even for dynamic values it could be easier just to create a method + 
annotate it (and register the class itself in the metrics system). IMHO.

> Expose OMMetrics
> ----------------
>
>                 Key: HDDS-910
>                 URL: https://issues.apache.org/jira/browse/HDDS-910
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>         Attachments: HDDS-910.00.patch
>
>
> Implement MetricsSource interface, so that external metrics can collect the 
> OMMetrics.
>  
> From *MetricsSource.java:*
> It registers with \{@link MetricsSystem}, which periodically polls it to 
> collect \{@link MetricsRecord} and passes it to \{@link MetricsSink}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to