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

Karan Mehta commented on PHOENIX-3655:
--------------------------------------

Thanks [~elserj] for helping out.

I had some internal discussions with [~apurtell] and [~tdsilva], we figured out 
that the initial agreement about metrics was to depend on hbase-metrics-api and 
use it since it get us all the good parts from hadoop-metrics2 and dropwizard 
metrics, while abstracting out the complications needed for any of those 
libraries.

As you suggested, the first pass will be to get all the metrics that thick 
client exposes via JMX Servlet. This should include Phoenix Global Metrics, 
Avatica Handler Metrics and Jetty Server metrics. Statement level and 
connection level metrics don't make much sense to be exposed via JMX since they 
are tied to particular applications. I would like to scope this Jira to the 
first part only. Let me know if you feel that there are any other metrics 
pending over here which can be exposed to ease the operations for PQS. A shim 
layer will be added to convert the relevant metrics to HBase metrics.

Metrics List:
 # Global Phoenix Metrics --> {{GlobalClientMetrics}} enum exposes a list of 
these metrics
 # Avatica Handler Metrics --> {{AvaticaJsonHandler}} and 
{{AvaticaProtobufHandler}} are the two implementations for handler. I found 
that {{AvaticaProtobufHandler}} exposes metric for 
serialization/de-serialization time and both the handlers expose end to end 
request timings. Let me know if I am missing anything here.
 # Jetty Server Metrics --> I am still digging into this. Would be helpful if 
you have any pointers.

 

> Metrics for PQS
> ---------------
>
>                 Key: PHOENIX-3655
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3655
>             Project: Phoenix
>          Issue Type: New Feature
>    Affects Versions: 4.8.0
>         Environment: Linux 3.13.0-107-generic kernel, v4.9.0-HBase-0.98
>            Reporter: Rahul Shrivastava
>            Assignee: Karan Mehta
>            Priority: Major
>             Fix For: 4.15.0
>
>         Attachments: MetricsforPhoenixQueryServerPQS.pdf
>
>   Original Estimate: 240h
>  Remaining Estimate: 240h
>
> Phoenix Query Server runs a separate process compared to its thin client. 
> Metrics collection is currently done by PhoenixRuntime.java i.e. at Phoenix 
> driver level. We need the following
> 1. For every jdbc statement/prepared statement/ run by PQS , we need 
> capability to collect metrics at PQS level and push the data to external sink 
> i.e. file, JMX , other external custom sources. 
> 2. Besides this global metrics could be periodically collected and pushed to 
> the sink. 
> 2. PQS can be configured to turn on metrics collection and type of collect ( 
> runtime or global) via hbase-site.xml
> 3. Sink could be configured via an interface in hbase-site.xml. 
> All metrics definition https://phoenix.apache.org/metrics.html



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

Reply via email to