phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajeshbabu Chintaguntla (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-1691) Allow settting sampling rate while enabling tracing.
Date Sat, 07 Mar 2015 02:27:38 GMT

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

Rajeshbabu Chintaguntla commented on PHOENIX-1691:
--------------------------------------------------

Thanks for review [~samarthjain]
bq.Looking at the code and the grammar changes, I am not sure how TRACE ON still works.
You are correct. The last minute change make it not work. Here is the proper grammar to make
it work. 
{noformat}
// Parse a trace statement.
trace_node returns [TraceStatement ret]
    :   TRACE (flag = ON  ( WITH SAMPLING s = sampling_rate)? | flag = OFF)
       {ret = factory.trace(Tracing.isTraceOn(flag.getText()), s == null ? Tracing.isTraceOn(flag.getText())
? 1.0 : 0.0 : (((BigDecimal)s.getValue())).doubleValue());}
    ;
{noformat}

bq. TRACE OFF WITH SAMPLING 0.5 should fail 
When we pass sampling to trace off query now query parsing itself fail. I will add test for
this.

bq. How is the following case handled:
Currently what ever sampler first chosen sticking with that. I am thinking whether we can
throw exception in this case to suggest the user that already trace enabled and to change
the sampler rate disable the trace and enable with new sampling rate. What do you say?

> Allow settting sampling rate while enabling tracing.
> ----------------------------------------------------
>
>                 Key: PHOENIX-1691
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1691
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>             Fix For: 5.0.0, 4.4
>
>         Attachments: PHOENIX-1691.patch
>
>
> Now we can dynamically enable/disable tracing from query. We should also be able to set
sampling rate while enabling tracing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message