You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "abhishek sen (JIRA)" <ji...@apache.org> on 2019/08/09 02:03:00 UTC
[jira] [Updated] (PHOENIX-5436) Histogram view of Global Client
Metrics
[ https://issues.apache.org/jira/browse/PHOENIX-5436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
abhishek sen updated PHOENIX-5436:
----------------------------------
Remaining Estimate: 336h (was: 168h)
Original Estimate: 336h (was: 168h)
> 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
> 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
(v7.6.14#76016)