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

James Taylor commented on PHOENIX-1241:
---------------------------------------

[~rajeshbabu] - interested in this one, as it would round out our tracing 
functionality pretty well? Take a look at the original description and comments 
and let me know if you have questions. One change that we'd need to make as 
part of this is to give the dynamic columns that are added names based on the 
metric name. Take a look at PhoenixMetricsSink.putMetrics() and notice how 
using meaningless, generated column names. Instead, we should use the 
metric.name() as the column name (in double quotes). If there are conflicts, we 
can have a simple scheme to prepend a number.

Once we do that, plus the lookup of the name in the PTable as mentioned above, 
we (and users) can pre-declare columns in the SYSTEM.TRACE table with the 
correct type (rather than as a String). Why is this important? Because of the 
way we're exposing tracing (by querying over the SYSTEM.TRACE table), we'll be 
able to do much more interesting queries if numeric data is captured as numbers 
instead of strings.

One more note: I don't know enough about the HTrace framework, but if an 
AbstractMetric has type information, then we can base the coercion from string 
to type based on that (instead of having to pre-declare the column in the 
SYSTEM.STATS table).

> Add typing to trace annotations
> -------------------------------
>
>                 Key: PHOENIX-1241
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1241
>             Project: Phoenix
>          Issue Type: Sub-task
>    Affects Versions: 5.0.0, 4.1.1
>            Reporter: Jesse Yates
>             Fix For: 5.0.0, 4.1.1
>
>
> Currently traces only support storing string valued annotations - this works 
> for known trace sources. However, phoenix will have trace annotations with 
> specific types. We can improve the storage format to know about these custom 
> types, rather than just storing strings, making the query interface more 
> powerful.
> See PHOENIX-1226 for more discussion



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

Reply via email to