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

Masatake Iwasaki commented on HTRACE-106:
-----------------------------------------

Thanks for the fix. I succeeded to comppile test code and run it. I have one 
more comment about htrace.h. 
{code}
    struct htrace_conf *htrace_conf_from_strs(const char *values,
                                              const char *defaults);
{code}
Should we make {{htrace_conf_from_str}} public API instead of 
{{htrace_conf_from_strs}}? It is unclear for users what the value of 
{{defaults}} shold be.

For example, conf without {{HTRACE_PROCESS_ID}} results in segfault in 
{{calculate_process_id}}.
{code}
    struct htrace_conf *test_conf = 
htrace_conf_from_strs(HTRACE_SPAN_RECEIVER_KEY "=htraced;"
                                                          HTRACE_SAMPLER_KEY 
"=always;"
                                                          HTRACED_ADDRESS_KEY 
"=localhost:9095",
                                                          "");
{code}
{noformat}
#0  calculate_process_id (lg=0x603b40, fmt=0x0, pname=pname@entry=0x4010ec 
"test_libhdfs_write") at 
/iwasakims/srcs/htrace/htrace-c/src/util/process_id.c:85
#1  0x00007ffff79b87bf in htrace_ctx_create (pname=0x4010ec 
"test_libhdfs_write", cnf=0x603830) at 
/iwasakims/srcs/htrace/htrace-c/src/core/ctx.c:70
#2  0x0000000000400ce3 in main (argc=1, argv=0x7fffffffe268) at 
test_libhdfs_write.c:34
{noformat}

I'm +1 if this is addressed. Thanks for your patience.


> htrace: add C / C++ native client
> ---------------------------------
>
>                 Key: HTRACE-106
>                 URL: https://issues.apache.org/jira/browse/HTRACE-106
>             Project: HTrace
>          Issue Type: New Feature
>    Affects Versions: 3.2.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HTRACE-106.001.patch, HTRACE-106.002.patch, 
> HTRACE-106.003.patch, HTRACE-106.005.patch, HTRACE-106.006.patch, 
> HTRACE-106.007.patch, HTRACE-106.008.patch, HTRACE-106.009.patch, 
> HTRACE-106.010.patch, HTRACE-106.011.patch
>
>
> Add a native client that is usable by C / C++ programs.  This client would 
> also be useful for building other things on top of, like a Python client.



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

Reply via email to