Hi Priyanka,

> <property>
> <name>hbase.trace.spanreceiver.classes</name>
> <value>org.cloudera.htrace.impl.LocalFileSpanReceiver</value>
> </property>
>
> <property>
> <name>hbase.local-file-span-receiver.path</name>
>         <value>/tmp/Client_htrace.out</value>
> </property>

Do you have /tmp/Client_htrace.out on the client node?
If span receiver is loaded successfully, the file should be created.

# If you use LocalFileSpanReceiver, client span is written to local file on client node.

Masatake

On 7/24/15 00:33, Priyanka B wrote:
> Hi Biju and Masatake,
>
> I have a similar problem for my client htrace spans. I am not able to see
> the parent client span in my trace output.
>
> I have enabled htrace logging on server side using the below configuration
> in hbase-site.xml
>
> <property>
> <name>hbase.trace.spanreceiver.classes</name>
> <value>org.cloudera.htrace.impl.LocalFileSpanReceiver</value>
> </property>
>
> <property>
> <name>hbase.local-file-span-receiver.path</name>
>         <value>/tmp/Server_htrace.out</value>
> </property>
>
> On the client side, I maintain a different configuration file
> hbase-client.xml
>
> <property>
> <name>hbase.trace.spanreceiver.classes</name>
> <value>org.cloudera.htrace.impl.LocalFileSpanReceiver</value>
> </property>
>
> <property>
> <name>hbase.local-file-span-receiver.path</name>
>         <value>/tmp/Client_htrace.out</value>
> </property>
>
> I am able to see the htrace spans when I start/close spans using the hbase
> shell so I think server configuration is correct.
> However, when I start and close span in my client side code, I see only the > server side span traces without the root parent span that is initiating the
> server rpc calls.
>
> Here is how I made changes to the client side code:
>
>  this.spanReceiverHost = SpanReceiverHost.getInstance(conf);
>
> I have initialized the spanReceiverHost like above. The conf is
> hbase-client.xml here.
>
> Then before a "Get" call I have done a start and close of trace:
>
>         TraceScope ts = Trace.startSpan("*Gets*", Sampler.ALWAYS);
>         try {
>             result = getTable(table).get(g);
>         }
>         catch (IOException e) {
>             throw new DatabaseException("Error fetching data: "
>                     + e.getMessage());
>         }
>         finally {
>             if (ts != null) {
>                 ts.close();
>             }
>         }
>
> For all the gets I see spans from the server side but no span with "*Gets*"
> in the description. I cannot make a graph out of the spans since it is
> missing the parent span.
>
> Am I missing some configuration? It will be great if someone could help me > on this. I have one region server, one master running in my environment and
> I am using hbase-0.98.8, htrace-20.4.
>
> Thanks a lot,
> Priyanka
>
>
>
>
> --
> View this message in context: http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073471.html
> Sent from the HBase Developer mailing list archive at Nabble.com.

Reply via email to