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

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

Thanks for updating, [~cmccabe]!

I tested 009 by adding some tracing code to test_libhdfs_write.c of today's 
hadoop-3.0.0-SNAPSHOT built against htrace-3.2.0-incubating-SNAPSHOT. Receiver 
for htraced seems to have some problems.


I got warning while compiling.
{noformat}
$ gcc test_libhdfs_write.c -I$HADOOP_HOME/include -L$HADOOP_HOME/lib/native -L. 
-lhdfs -lhtrace -lpthread -lcurl -o test_libhdfs_write
test_libhdfs_write.c: In function ‘main’:
test_libhdfs_write.c:28:37: warning: initialization makes pointer from integer 
without a cast [enabled by default]
     struct htrace_conf *test_conf = 
htrace_conf_from_str(HTRACE_SPAN_RECEIVER_KEY "=htraced;"
{noformat}


htraced.c uses {{hexdump}} defined in test.c. The code in htraced.c seems to be 
garbage of try-and-error.
{noformat}
./libhtrace.a(htraced.c.o): In function `htraced_xmit_impl':
/iwasakims/srcs/htrace/htrace-c/src/receiver/htraced.c:408: undefined reference 
to `hexdump'
collect2: error: ld returned 1 exit status
{noformat}


I think it would be kind to use default such as "localhost:9095".
{noformat}
$ LD_LIBRARY_PATH=$HADOOP_HOME/lib/native ./test_libhdfs_write /tmp/test02.txt 
1024 1024
htraced_rcv_create: no value found for htraced.address. You must set this 
configuration key to the hostname:port identifying the htraced server.
htrace_ctx_create: failed to create a receiver.
Segmentation fault (core dumped)
{noformat}


I got tons of {{cbuf_used}} messages.
{noformat}
$ LD_LIBRARY_PATH=$HADOOP_HOME/lib/native ./test_libhdfs_write /tmp/test02.txt 
1024 1024
successfully initialized libcurl...
Initialized htraced receiver with url=localhost:9095/writeSpans, 
send_timeo_ms=120000, send_threshold=16777216, clen=67108864.
cbuf_used(cstart=0, cend=0): used=0
cbuf_used(cstart=0, cend=0): used=0
cbuf_used(cstart=0, cend=0): used=0
cbuf_used(cstart=0, cend=0): used=0
cbuf_used(cstart=0, cend=0): used=0
...
{noformat}


> 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
>
>
> 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