You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Daniel Wong (Jira)" <ji...@apache.org> on 2020/10/02 23:30:00 UTC

[jira] [Commented] (PHOENIX-5436) Histogram view of Global Client Metrics

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

Daniel Wong commented on PHOENIX-5436:
--------------------------------------

Hey we should combine this with the work [~abhishek.sen] [~rushabh.shah] and [~vmeka] are working .  ICan we close https://issues.apache.org/jira/browse/PHOENIX-5838 perhaps as a duplicate or other was around?  Same with the pair of https://issues.apache.org/jira/browse/PHOENIX-5837 and https://issues.apache.org/jira/browse/PHOENIX-5469 .  Can we come to an agreement and close the duplicates?  
FYI [~ckulkarni]

> Histogram view of Global Client Metrics
> ---------------------------------------
>
>                 Key: PHOENIX-5436
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5436
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: abhishek sen
>            Priority: Minor
>              Labels: histogram, metric-collector, metrics
>         Attachments: Histogram_View_of_Global_Client_metrics_log_typo_corrected.patch, Histogram_View_of_Global_Client_metrics_removing_star_imports.patch, Histogram_View_of_some_Global_Client_metrics.patch
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Currently the [GlobalClientMetrics|https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java] enum-class defines Phoenix Global Client Metrics as an enum and each metric-enum tracks a [Phoenix Metric|https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/monitoring/Metric.java] object implemented by [AtomicMetric|https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/monitoring/AtomicMetric.java] class. This tracks a single counter, but in some use cases we want the distribution of a particular metric value over some period of time. One example could be the metric [TASK_EXECUTION_TIME|https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/monitoring/MetricType.java#L47]. The Global Client metric tracks the aggregate value for the execution time of the task. More useful information to monitor would be the distribution of task execution time instead. 
>  Now, in order to incorporate histogram view of the metric, we can use the [Histogram Implementation|https://github.com/apache/hbase/blob/master/hbase-metrics/src/main/java/org/apache/hadoop/hbase/metrics/impl/HistogramImpl.java] from hbase-metrics-api package. The current GlobalClientMetric also ultimately adapts to hbase-metrics-api interface but it [implements|https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java#L155] the [Gauge|https://github.com/apache/hbase/blob/master/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/Gauge.java] class which can only keep track of a single value not a histogram. So one way could be to create a new GlobalClientHistogramMetrics enum class which keeps track of a Histogram (based on [MutableTimeHistogram|https://github.com/apache/hbase/blob/master/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/lib/MutableTimeHistogram.java]) for each enum-metric instead of a single counter as it is now. The updating of the these new metric can go [here|https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/job/JobManager.java#L289] within JobManager class where the currently available Global as well as request-level metrics are being updated.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)