You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@htrace.apache.org by "Colin Patrick McCabe (JIRA)" <ji...@apache.org> on 2015/04/16 21:17:58 UTC

[jira] [Comment Edited] (HTRACE-106) htrace: add C / C++ native client

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

Colin Patrick McCabe edited comment on HTRACE-106 at 4/16/15 7:17 PM:
----------------------------------------------------------------------

{code}
$ 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;"
{code}

Hmm.  None of those parameters are integers.  My guess would be that there is a problem with the test program.  Where are you including htrace.h from?

bq. htraced.c uses hexdump defined in test.c. The code in htraced.c seems to be garbage of try-and-error.

Good catch.  It should not be using hexdump since that is only for testing.  There are other log messages in that file that should not be there.  I'll see if I can create a unit test that verifies that we don't have unresolved dependencies in the library.

bq, I think it would be kind to use default such as "localhost:9095".

Yeah, that makes sense.

bq. I got tons of cbuf_used messages.

Yeah, let me remove those

bq. Yeah. We could add some notes for testing to BUILDING.txt

Good idea


was (Author: cmccabe):
{code}
$ 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;"
{code}

I'm not sure why you would be getting this warning, since none of those parameters are integers.  My guess would be that there is a problem with the test program.  Where are you including htrace.h from?

bq, htraced.c uses hexdump defined in test.c. The code in htraced.c seems to be garbage of try-and-error.

Good catch.  It should not be using hexdump since that is only for testing.  There are other log messages in that file that should not be there.  I'll see if I can create a unit test that verifies that we don't have unresolved dependencies in the library.

bq, I think it would be kind to use default such as "localhost:9095".

Yeah, that makes sense.

bq. I got tons of cbuf_used messages.

Yeah, let me remove those

bq. Yeah. We could add some notes for testing to BUILDING.txt

Good idea

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