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

Ankit Singhal commented on PHOENIX-2715:
----------------------------------------

Thanks [~elserj] for testing it.

bq. I see the SYSTEM.LOG table was created, but the table is not getting 
propagated with any information. Maybe it's related to just using sqlline? I've 
been waiting a bit to see if the results are just delayed, and that doesn't 
seem to be the case. I can see that the QueryLogger is created and then stopped 
before I get a prompt. Additionally, I can see that there is no QueryLogger* 
thread running in the sqlline jvm
My bad, while porting patch for master , I moved disruptor from connection to 
connection query services so that we will not create it for every connection, 
but close() was happening in connection only, so the disruptor is getting 
shutdown for any connection close. I fixed it in the latest patch. 

bq. maybe I need to enable request metrics for it to 
work?(QueryServices.COLLECT_REQUEST_LEVEL_METRICS)
this needs to be set if we need scan metrics to be logged.(SCAN_METRICS_JSON 
column)
{code}
SCAN_METRICS_JSON       
[{"scan":{"loadColumnFamiliesOnDemand":null,"filter":"COLUMN_FAMILY IS 
NULL","startRow":"\\x00\\x00SYSTEM.LOG\\x00\\x01","stopRow":"\\x00\\x00SYSTEM.LOG\\x01","batch":-1,"cacheBlocks":true,"totalColumns":7,"maxResultSize":2097152,"families":{"0":["COLUMN_SIZE","DATA_TYPE","KEY_SEQ","PK_NAME"]},"caching":2147483647,"maxVersions":1,"timeRange":[0,9223372036854775807]},
 
"scanMetrics":{"BYTES_IN_RESULTS":0,"MILLIS_BETWEEN_NEXTS":2,"REGIONS_SCANNED":1,"REMOTE_RPC_CALLS":0,"BYTES_IN_REMOTE_RESULTS":0,"ROWS_SCANNED":0,"ROWS_FILTERED":0,"RPC_RETRIES":0,"RPC_CALLS":1,"NOT_SERVING_REGION_EXCEPTION":0,"REMOTE_RPC_RETRIES":0}}]
{code}




> Query Log
> ---------
>
>                 Key: PHOENIX-2715
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2715
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Nick Dimiduk
>            Assignee: Ankit Singhal
>            Priority: Major
>         Attachments: PHOENIX-2715.patch, PHOENIX-2715_master.patch, 
> PHOENIX-2715_master_V1.patch
>
>
> One useful feature of other database systems is the query log. It allows the 
> DBA to review the queries run, who's run them, time taken, &c. This serves 
> both as an audit and also as a source of "ground truth" for performance 
> optimization. For instance, which columns should be indexed. It may also 
> serve as the foundation for automated performance recommendations/actions.
> What queries are being run is the first piece. Have this data tied into 
> tracing results and perhaps client-side metrics (PHOENIX-1819) becomes very 
> useful.
> This might take the form of clients writing data to a new system table, but 
> other implementation suggestions are welcome.



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

Reply via email to