You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by yun peng <pe...@gmail.com> on 2014/08/08 04:11:38 UTC
How to turn on tracing on HBase?
Hi, I have searched online but did not find an answer, so I am asking
around here.
I would like to enable the tracing function on HBase. I heard that it is
possible as HBase is already instrumented and uses HTrace. But I do not
know how to turn on the HTrace function on an HBase (e.g. what is the
correct configuration knob for this purpose? and which version of HBase
should I use).. Thanks
Regards,
Yun
Re: How to turn on tracing on HBase?
Posted by yun peng <pe...@gmail.com>.
I have followed the hbase book (http://hbase.apache.org/book.html#tracing)
to use LocalFileSpanReceiver to capture all the traces. But after running
the program, it did not capture the traces. The details are the following.
Btw, I think the hbase book works only for HBase-0.99-SNAPSHOT, since in
0.98.4 the htrace is still named under org.cloudera.htrace.* (in the book
link, it's org.htrace.*)
I use the following client program for tracing
--------------------------------------------
public void run(){
Configuration conf = HBaseConfiguration.create();
SpanReceiverHost spanReceiverHost =
SpanReceiverHost.getInstance(conf);
TraceScope ts = Trace.startSpan("Gets", Sampler.ALWAYS);
try {
HTable table = new HTable(conf, "t1");
Get get = new Get(Bytes.toBytes("k"));
Result res = table.get(get);
analyzeResult(res);
} catch(Exception e){
e.printStackTrace();
} finally {
ts.close();
}
spanReceiverHost.closeReceivers();
}
--------------------------------------------
The HBase-0.99-SNAPSHOT server is set up with the suggested configuration
in hbase-site.xml. I think the server is set up correctly, since I use
hbase shell to turn on tracing, it works perfectly.
--------------------------------------------
<property>
<name>hbase.trace.spanreceiver.classes</name>
<value>org.htrace.impl.LocalFileSpanReceiver</value>
</property>
<property>
<name>hbase.local-file-span-receiver.path</name>
<value>/home/hbaseuser/htrace.out</value>
</property>
--------------------------------------------
On Thu, Aug 7, 2014 at 11:43 PM, Nick Dimiduk <nd...@gmail.com> wrote:
> You can also have a look at PerformanceEvaluation tool on master (and
> probably branch-1 and 0.98, but I don't recall exactly). See what it does
> on the client side to enable tracing. IIRC, the param is --traceRate.
>
> -n
>
> On Thursday, August 7, 2014, Ted Yu <yu...@gmail.com> wrote:
>
> > See http://hbase.apache.org/book.html#tracing
> >
> > You can use 0.96+ for this feature.
> >
> > Cheers
> >
> >
> > On Thu, Aug 7, 2014 at 7:11 PM, yun peng <pengyunmomo@gmail.com
> > <javascript:;>> wrote:
> >
> > > Hi, I have searched online but did not find an answer, so I am asking
> > > around here.
> > >
> > > I would like to enable the tracing function on HBase. I heard that it
> is
> > > possible as HBase is already instrumented and uses HTrace. But I do not
> > > know how to turn on the HTrace function on an HBase (e.g. what is the
> > > correct configuration knob for this purpose? and which version of HBase
> > > should I use).. Thanks
> > >
> > > Regards,
> > > Yun
> > >
> >
>
Re: How to turn on tracing on HBase?
Posted by Nick Dimiduk <nd...@gmail.com>.
You can also have a look at PerformanceEvaluation tool on master (and
probably branch-1 and 0.98, but I don't recall exactly). See what it does
on the client side to enable tracing. IIRC, the param is --traceRate.
-n
On Thursday, August 7, 2014, Ted Yu <yu...@gmail.com> wrote:
> See http://hbase.apache.org/book.html#tracing
>
> You can use 0.96+ for this feature.
>
> Cheers
>
>
> On Thu, Aug 7, 2014 at 7:11 PM, yun peng <pengyunmomo@gmail.com
> <javascript:;>> wrote:
>
> > Hi, I have searched online but did not find an answer, so I am asking
> > around here.
> >
> > I would like to enable the tracing function on HBase. I heard that it is
> > possible as HBase is already instrumented and uses HTrace. But I do not
> > know how to turn on the HTrace function on an HBase (e.g. what is the
> > correct configuration knob for this purpose? and which version of HBase
> > should I use).. Thanks
> >
> > Regards,
> > Yun
> >
>
Re: How to turn on tracing on HBase?
Posted by Ted Yu <yu...@gmail.com>.
See http://hbase.apache.org/book.html#tracing
You can use 0.96+ for this feature.
Cheers
On Thu, Aug 7, 2014 at 7:11 PM, yun peng <pe...@gmail.com> wrote:
> Hi, I have searched online but did not find an answer, so I am asking
> around here.
>
> I would like to enable the tracing function on HBase. I heard that it is
> possible as HBase is already instrumented and uses HTrace. But I do not
> know how to turn on the HTrace function on an HBase (e.g. what is the
> correct configuration knob for this purpose? and which version of HBase
> should I use).. Thanks
>
> Regards,
> Yun
>