You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Biju G.S Nair" <gs...@gmail.com> on 2014/03/05 18:08:00 UTC

HTrace

Trying to understand the process to enable HTrace. Following is the change
to hbase-site.xml
  <property>
    <name>hbase.trace.spanreceiver.localfilespanreceiver.filename</name>
    <value>/var/log/hbase/htrace.out</value>
  </property>

Following is a simple code to trace a get call

public static void main(String[] args) throws IOException {

           Configuration conf = HBaseConfiguration.create();

          TraceScope getSpan = Trace.startSpan("Gets", Sampler.ALWAYS);

    try{

          System.out.println("Is tracing on :"+Trace.isTracing());

          HTable table = new HTable(conf, "t1");

         Get get = new Get(Bytes.toBytes("r1"));

         Result res = table.get(get);

         System.out.println(res.toString());

         table.close();

         } catch(Exception e) {

                    getSpan.close();

         } finally {

        getSpan.close();

   }

}
Is something missed
?
No trace file is getting
generated
. Thanks in advance.

Thanks,
Biju

Re: HTrace

Posted by Nick Dimiduk <nd...@gmail.com>.
FYI Priyanka, hbase-dev@hadoop.apache.org is effectively /dev/null. If
you'd like HBase devs to see your questions, please use dev@hbase.apache.org
instead.

On Tue, Aug 4, 2015 at 11:51 AM, Priyanka B <pr...@gmail.com>
wrote:

> Hi Masatake,
>
> I was not able to get the client traces but I can find a workaround to
> generate those spans myself and get a graph. I had one more question
> related
> to htrace.
>
> If both client process and server use the same file to log htraces, then is
> there a possibility of corruption while writing to the span log file? Since
> there will be 2 JVMs writing to the same file. In addition, our client is
> multithreaded too. I can use synchronize on the client side and make sure
> multiple threads write the client spans in order, however there can be a
> problem if a server span is being written at the same time. Let me know
> what
> you recommend. Thank you.
>
> Best Regards,
> Priyanka
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073682.html
> Sent from the HBase Developer mailing list archive at Nabble.com.
>

Re: HTrace

Posted by Priyanka B <pr...@gmail.com>.
Hi Masatake,

I was not able to get the client traces but I can find a workaround to
generate those spans myself and get a graph. I had one more question related
to htrace.

If both client process and server use the same file to log htraces, then is
there a possibility of corruption while writing to the span log file? Since
there will be 2 JVMs writing to the same file. In addition, our client is
multithreaded too. I can use synchronize on the client side and make sure
multiple threads write the client spans in order, however there can be a
problem if a server span is being written at the same time. Let me know what
you recommend. Thank you.

Best Regards,
Priyanka



--
View this message in context: http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073682.html
Sent from the HBase Developer mailing list archive at Nabble.com.

Re: HTrace

Posted by Priyanka B <pr...@gmail.com>.
No I do not have multiple processes on the client. I tried a standalone
program with the same configuration and that works fine and generates traces
too. It is only the client code where tomcat is running is unable to
generate spans.

Thanks,
Priyanka



--
View this message in context: http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073524.html
Sent from the HBase Developer mailing list archive at Nabble.com.

Re: HTrace

Posted by Priyanka Bhalerao-Deshpande <pr...@gmail.com>.
Thank you. I will make sure I use different log files as I had mentioned in
my previous post on the client configuration for HTrace.

Thanks,
Priyanka

On Wed, Aug 5, 2015 at 6:43 PM, Masatake Iwasaki [via Apache HBase] <
ml-node+s679495n4073718h44@n3.nabble.com> wrote:

> Hi Priyanka,
>
>  > If both client process and server use the same file to log htraces,
> then is
>  > there a possibility of corruption while writing to the span log file?
>
> The client and server are running on the same host?
> You should use different output file for each process.
> It is not safe to write to the same file from multiple processes
> though it is not problem to write spans from multiple threads in single
> process.
>
> Masatake
>
>
> On 8/6/15 01:56, Priyanka Bhalerao-Deshpande wrote:
>  > Hi Masatake,
>  >
>  > I was not able to get the client traces but I can find a workaround to
>  > generate those spans myself and get a graph. I had one more question
>  > related to htrace.
>  >
>  > If both client process and server use the same file to log htraces,
> then is
>  > there a possibility of corruption while writing to the span log file?
> Since
>  > there will be 2 JVMs writing to the same file. In addition, our client
> is
>  > multithreaded too. I can use synchronize on the client side and make
> sure
>  > multiple threads write the client spans in exclusion, however there
> can be
>  > a problem if a server span is being written at the same time. Let me
> know
>  > what you recommend. Thank you.
>  >
>  > Best Regards,
>  > Priyanka
>  >
>  > On Mon, Jul 27, 2015 at 10:51 AM, Masatake Iwasaki [via Apache HBase] <
>  > [hidden email] <http:///user/SendEmail.jtp?type=node&node=4073718&i=0>>
> wrote:
>  >
>  >>  > Thank you for getting back to me. Yes I see the Client_htrace.out
>  >> getting
>  >>  > created on the client node. However it is empty. We are using
>  >> htrace-2.04
>  >>  > version. I believe that writes the span asynchronously. Also the
>  >> client node
>  >>  > is running tomcat for serving requests. Would this be a problem?
>  >>
>  >> Hmm... Do you have multiple processes on the client?
>  >> SpanReceiverHost must be initialized in each process.
>  >> If you call SpanReceiverHost#getInstance in one process and
>  >> call Trace#startSpan in another process,
>  >> the client span is not written to file.
>  >>
>  >> I think running Tomcat is not related to the issue.
>  >>
>  >>
>  >>  > Is there any need to call closeReceivers in the client side code ?
> I
>  >> tried
>  >>  > it but that did not seem to work.
>  >>
>  >> SpanReceiverHost#closeReceivers should be called on just before
> process
>  >> exit
>  >> but spans will be written to file immediately without that.
>  >>
>  >>
>  >>
>  >> On 7/28/15 01:47, Priyanka B wrote:
>  >>  > Hi Masatake,
>  >>  >
>  >>  > Thank you for getting back to me. Yes I see the Client_htrace.out
>  >> getting
>  >>  > created on the client node. However it is empty. We are using
>  >> htrace-2.04
>  >>  > version. I believe that writes the span asynchronously. Also the
>  >> client node
>  >>  > is running tomcat for serving requests. Would this be a problem?
>  >>  >
>  >>  > Is there any need to call closeReceivers in the client side code ?
> I
>  >> tried
>  >>  > it but that did not seem to work.
>  >>  >
>  >>  >
>  >>  > Thanks,
>  >>  > Priyanka
>  >>  >
>  >>  >
>  >>  >
>  >>  > --
>  >>  > View this message in context:
>  >> http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073515.html
>  >>  > Sent from the HBase Developer mailing list archive at Nabble.com.
>  >>
>  >>
>  >>
>  >>
>  >> ------------------------------
>  >> If you reply to this email, your message will be added to the
> discussion
>  >> below:
>  >> http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073518.html
>  >> To unsubscribe from HTrace, click here
>  >>
> <
>  >> .
>  >> NAML
>  >>
> <
> http://apache-hbase.679495.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>  >>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073718.html
> To unsubscribe from HTrace, click here
> <http://apache-hbase.679495.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4056705&code=cHJpeWFua2EuYmhhbGVyYW9AZ21haWwuY29tfDQwNTY3MDV8LTEwODc3MjQ5NTQ=>
> .
> NAML
> <http://apache-hbase.679495.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>

Re: HTrace

Posted by Masatake Iwasaki <iw...@oss.nttdata.co.jp>.
Hi Priyanka,

 > If both client process and server use the same file to log htraces, 
then is
 > there a possibility of corruption while writing to the span log file?

The client and server are running on the same host?
You should use different output file for each process.
It is not safe to write to the same file from multiple processes
though it is not problem to write spans from multiple threads in single 
process.

Masatake


On 8/6/15 01:56, Priyanka Bhalerao-Deshpande wrote:
 > Hi Masatake,
 >
 > I was not able to get the client traces but I can find a workaround to
 > generate those spans myself and get a graph. I had one more question
 > related to htrace.
 >
 > If both client process and server use the same file to log htraces, 
then is
 > there a possibility of corruption while writing to the span log file? 
Since
 > there will be 2 JVMs writing to the same file. In addition, our client is
 > multithreaded too. I can use synchronize on the client side and make sure
 > multiple threads write the client spans in exclusion, however there 
can be
 > a problem if a server span is being written at the same time. Let me know
 > what you recommend. Thank you.
 >
 > Best Regards,
 > Priyanka
 >
 > On Mon, Jul 27, 2015 at 10:51 AM, Masatake Iwasaki [via Apache HBase] <
 > ml-node+s679495n4073518h44@n3.nabble.com> wrote:
 >
 >>  > Thank you for getting back to me. Yes I see the Client_htrace.out
 >> getting
 >>  > created on the client node. However it is empty. We are using
 >> htrace-2.04
 >>  > version. I believe that writes the span asynchronously. Also the
 >> client node
 >>  > is running tomcat for serving requests. Would this be a problem?
 >>
 >> Hmm... Do you have multiple processes on the client?
 >> SpanReceiverHost must be initialized in each process.
 >> If you call SpanReceiverHost#getInstance in one process and
 >> call Trace#startSpan in another process,
 >> the client span is not written to file.
 >>
 >> I think running Tomcat is not related to the issue.
 >>
 >>
 >>  > Is there any need to call closeReceivers in the client side code ? I
 >> tried
 >>  > it but that did not seem to work.
 >>
 >> SpanReceiverHost#closeReceivers should be called on just before process
 >> exit
 >> but spans will be written to file immediately without that.
 >>
 >>
 >>
 >> On 7/28/15 01:47, Priyanka B wrote:
 >>  > Hi Masatake,
 >>  >
 >>  > Thank you for getting back to me. Yes I see the Client_htrace.out
 >> getting
 >>  > created on the client node. However it is empty. We are using
 >> htrace-2.04
 >>  > version. I believe that writes the span asynchronously. Also the
 >> client node
 >>  > is running tomcat for serving requests. Would this be a problem?
 >>  >
 >>  > Is there any need to call closeReceivers in the client side code ? I
 >> tried
 >>  > it but that did not seem to work.
 >>  >
 >>  >
 >>  > Thanks,
 >>  > Priyanka
 >>  >
 >>  >
 >>  >
 >>  > --
 >>  > View this message in context:
 >> http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073515.html
 >>  > Sent from the HBase Developer mailing list archive at Nabble.com.
 >>
 >>
 >>
 >>
 >> ------------------------------
 >> If you reply to this email, your message will be added to the discussion
 >> below:
 >> http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073518.html
 >> To unsubscribe from HTrace, click here
 >> 
<http://apache-hbase.679495.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4056705&code=cHJpeWFua2EuYmhhbGVyYW9AZ21haWwuY29tfDQwNTY3MDV8LTEwODc3MjQ5NTQ=>
 >> .
 >> NAML
 >> 
<http://apache-hbase.679495.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
 >>

Re: HTrace

Posted by Priyanka Bhalerao-Deshpande <pr...@gmail.com>.
Hi Masatake,

I was not able to get the client traces but I can find a workaround to
generate those spans myself and get a graph. I had one more question
related to htrace.

If both client process and server use the same file to log htraces, then is
there a possibility of corruption while writing to the span log file? Since
there will be 2 JVMs writing to the same file. In addition, our client is
multithreaded too. I can use synchronize on the client side and make sure
multiple threads write the client spans in exclusion, however there can be
a problem if a server span is being written at the same time. Let me know
what you recommend. Thank you.

Best Regards,
Priyanka

On Mon, Jul 27, 2015 at 10:51 AM, Masatake Iwasaki [via Apache HBase] <
ml-node+s679495n4073518h44@n3.nabble.com> wrote:

>  > Thank you for getting back to me. Yes I see the Client_htrace.out
> getting
>  > created on the client node. However it is empty. We are using
> htrace-2.04
>  > version. I believe that writes the span asynchronously. Also the
> client node
>  > is running tomcat for serving requests. Would this be a problem?
>
> Hmm... Do you have multiple processes on the client?
> SpanReceiverHost must be initialized in each process.
> If you call SpanReceiverHost#getInstance in one process and
> call Trace#startSpan in another process,
> the client span is not written to file.
>
> I think running Tomcat is not related to the issue.
>
>
>  > Is there any need to call closeReceivers in the client side code ? I
> tried
>  > it but that did not seem to work.
>
> SpanReceiverHost#closeReceivers should be called on just before process
> exit
> but spans will be written to file immediately without that.
>
>
>
> On 7/28/15 01:47, Priyanka B wrote:
>  > Hi Masatake,
>  >
>  > Thank you for getting back to me. Yes I see the Client_htrace.out
> getting
>  > created on the client node. However it is empty. We are using
> htrace-2.04
>  > version. I believe that writes the span asynchronously. Also the
> client node
>  > is running tomcat for serving requests. Would this be a problem?
>  >
>  > Is there any need to call closeReceivers in the client side code ? I
> tried
>  > it but that did not seem to work.
>  >
>  >
>  > Thanks,
>  > Priyanka
>  >
>  >
>  >
>  > --
>  > View this message in context:
> http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073515.html
>  > Sent from the HBase Developer mailing list archive at Nabble.com.
>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073518.html
> To unsubscribe from HTrace, click here
> <http://apache-hbase.679495.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4056705&code=cHJpeWFua2EuYmhhbGVyYW9AZ21haWwuY29tfDQwNTY3MDV8LTEwODc3MjQ5NTQ=>
> .
> NAML
> <http://apache-hbase.679495.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>

Re: HTrace

Posted by Masatake Iwasaki <iw...@oss.nttdata.co.jp>.
 > Thank you for getting back to me. Yes I see the Client_htrace.out getting
 > created on the client node. However it is empty. We are using htrace-2.04
 > version. I believe that writes the span asynchronously. Also the 
client node
 > is running tomcat for serving requests. Would this be a problem?

Hmm... Do you have multiple processes on the client?
SpanReceiverHost must be initialized in each process.
If you call SpanReceiverHost#getInstance in one process and
call Trace#startSpan in another process,
the client span is not written to file.

I think running Tomcat is not related to the issue.


 > Is there any need to call closeReceivers in the client side code ? I 
tried
 > it but that did not seem to work.

SpanReceiverHost#closeReceivers should be called on just before process exit
but spans will be written to file immediately without that.



On 7/28/15 01:47, Priyanka B wrote:
 > Hi Masatake,
 >
 > Thank you for getting back to me. Yes I see the Client_htrace.out getting
 > created on the client node. However it is empty. We are using htrace-2.04
 > version. I believe that writes the span asynchronously. Also the 
client node
 > is running tomcat for serving requests. Would this be a problem?
 >
 > Is there any need to call closeReceivers in the client side code ? I 
tried
 > it but that did not seem to work.
 >
 >
 > Thanks,
 > Priyanka
 >
 >
 >
 > --
 > View this message in context: 
http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073515.html
 > Sent from the HBase Developer mailing list archive at Nabble.com.



Re: HTrace

Posted by Priyanka B <pr...@gmail.com>.
Hi Masatake,

Thank you for getting back to me. Yes I see the Client_htrace.out getting
created on the client node. However it is empty. We are using htrace-2.04
version. I believe that writes the span asynchronously. Also the client node
is running tomcat for serving requests. Would this be a problem?

Is there any need to call closeReceivers in the client side code ? I tried
it but that did not seem to work.


Thanks,
Priyanka



--
View this message in context: http://apache-hbase.679495.n3.nabble.com/HTrace-tp4056705p4073515.html
Sent from the HBase Developer mailing list archive at Nabble.com.

Re: HTrace

Posted by Masatake Iwasaki <iw...@oss.nttdata.co.jp>.
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.


Re: HTrace

Posted by Priyanka B <pr...@gmail.com>.
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.

Re: HTrace

Posted by "Biju G.S Nair" <gs...@gmail.com>.
The test code was run on a multi-node environment  Will executing the code
on an environment with one master server and one RS generate the trace
correctly.

Thanks,
Biju


On Thu, Mar 6, 2014 at 2:59 AM, Masatake Iwasaki <
iwasakims@oss.nttdata.co.jp> wrote:

> Hi Biju,
>
>
> > Where you able to use the graphDrawer.py script against the HTrace
> > output. Attached is the output got from my test and didn't generate any
> > image. Any thoughts why? Thanks
>
> Your tracing output does not include spans whose parent is root (which has
> the ID 0x74ace).
> I think the cause is that the test code did not initialized
> SpanReceiverHost properly
> or you run the test code on multi-node environment.
>
> Regards,
> Masatake Iwasaki
>
>
>
> (3/5/14, 16:41), Biju G.S Nair wrote:
>
>> Masatake,
>>      Where you able to use the graphDrawer.py script against the HTrace
>> output. Attached is the output got from my test and didn't generate any
>> image. Any thoughts why? Thanks in advance.
>>
>>
>>
>> - Biju
>>
>>
>>
>> On Wed, Mar 5, 2014 at 4:57 PM, Masatake Iwasaki <
>> iwasakims@oss.nttdata.co.jp> wrote:
>>
>>  Hi Biju,
>>>
>>>
>>>  The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only in
>>>>
>>> the
>>>
>>>> server jar. If we intend to keep the client and server components in
>>>> separate jars this call need to be included in the client jar as well.
>>>>
>>>
>>> Thanks for your feedback!
>>> I will take this into consideration on fixing docs.
>>>
>>> Regards,
>>> Masatake Iwasaki
>>>
>>>
>>> (3/5/14, 11:51), Biju G.S Nair wrote:
>>>
>>>  Thanks Masatake.
>>>>
>>>> The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only in
>>>> the
>>>> server jar. If we intend to keep the client and server components in
>>>> separate jars this call need to be included in the client jar as well.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Thanks,
>>>> Biju
>>>> Tel#: 978-707-5066
>>>>
>>>>
>>>> On Wed, Mar 5, 2014 at 1:29 PM, Masatake Iwasaki <
>>>> iwasakims@oss.nttdata.co.jp> wrote:
>>>>
>>>>   Hi Biju,
>>>>
>>>>>
>>>>>
>>>>>   Trying to understand the process to enable HTrace. Following is the
>>>>>
>>>>>>
>>>>>>  change
>>>>>
>>>>>  to hbase-site.xml
>>>>>>      <property>
>>>>>>        <name>hbase.trace.spanreceiver.localfilespanreceiver.
>>>>>>
>>>>>>  filename</name>
>>>>>
>>>>>         <value>/var/log/hbase/htrace.out</value>
>>>>>>      </property>
>>>>>>
>>>>>>
>>>>> Please try configuration like below.::
>>>>>
>>>>>     <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>/var/log/hbase/htrace.out</value>
>>>>>     </property>
>>>>>
>>>>> and add lines for receivers initialization to your client code before
>>>>> starting trace.::
>>>>>
>>>>>     import org.apache.hadoop.hbase.trace.SpanReceiverHost;
>>>>>     ...
>>>>>     private SpanReceiverHost spanReceiverHost;
>>>>>     ...
>>>>>     spanReceiverHost = SpanReceiverHost.getInstance(conf);
>>>>>
>>>>> I will file a JIRA to fix documentation later.
>>>>>
>>>>>
>>>>> Regards,
>>>>> Masatake Iwasaki
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> (3/5/14, 9:08), Biju G.S Nair wrote:
>>>>>
>>>>>   Trying to understand the process to enable HTrace. Following is the
>>>>>
>>>>>> change
>>>>>> to hbase-site.xml
>>>>>>      <property>
>>>>>>        <name>hbase.trace.spanreceiver.localfilespanreceiver.
>>>>>> filename</name>
>>>>>>        <value>/var/log/hbase/htrace.out</value>
>>>>>>      </property>
>>>>>>
>>>>>> Following is a simple code to trace a get call
>>>>>>
>>>>>> public static void main(String[] args) throws IOException {
>>>>>>
>>>>>>               Configuration conf = HBaseConfiguration.create();
>>>>>>
>>>>>>              TraceScope getSpan = Trace.startSpan("Gets",
>>>>>> Sampler.ALWAYS);
>>>>>>
>>>>>>        try{
>>>>>>
>>>>>>              System.out.println("Is tracing on :"+Trace.isTracing());
>>>>>>
>>>>>>              HTable table = new HTable(conf, "t1");
>>>>>>
>>>>>>             Get get = new Get(Bytes.toBytes("r1"));
>>>>>>
>>>>>>             Result res = table.get(get);
>>>>>>
>>>>>>             System.out.println(res.toString());
>>>>>>
>>>>>>             table.close();
>>>>>>
>>>>>>             } catch(Exception e) {
>>>>>>
>>>>>>                        getSpan.close();
>>>>>>
>>>>>>             } finally {
>>>>>>
>>>>>>            getSpan.close();
>>>>>>
>>>>>>       }
>>>>>>
>>>>>> }
>>>>>> Is something missed
>>>>>> ?
>>>>>> No trace file is getting
>>>>>> generated
>>>>>> . Thanks in advance.
>>>>>>
>>>>>> Thanks,
>>>>>> Biju
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: HTrace

Posted by Masatake Iwasaki <iw...@oss.nttdata.co.jp>.
Hi Biju,

 > Where you able to use the graphDrawer.py script against the HTrace
 > output. Attached is the output got from my test and didn't generate any
 > image. Any thoughts why? Thanks

Your tracing output does not include spans whose parent is root (which has the ID 0x74ace).
I think the cause is that the test code did not initialized SpanReceiverHost properly
or you run the test code on multi-node environment.

Regards,
Masatake Iwasaki


(3/5/14, 16:41), Biju G.S Nair wrote:
> Masatake,
>      Where you able to use the graphDrawer.py script against the HTrace
> output. Attached is the output got from my test and didn't generate any
> image. Any thoughts why? Thanks in advance.
>
>
>
> - Biju
>
>
>
> On Wed, Mar 5, 2014 at 4:57 PM, Masatake Iwasaki <
> iwasakims@oss.nttdata.co.jp> wrote:
>
>> Hi Biju,
>>
>>
>>> The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only in
>> the
>>> server jar. If we intend to keep the client and server components in
>>> separate jars this call need to be included in the client jar as well.
>>
>> Thanks for your feedback!
>> I will take this into consideration on fixing docs.
>>
>> Regards,
>> Masatake Iwasaki
>>
>>
>> (3/5/14, 11:51), Biju G.S Nair wrote:
>>
>>> Thanks Masatake.
>>>
>>> The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only in
>>> the
>>> server jar. If we intend to keep the client and server components in
>>> separate jars this call need to be included in the client jar as well.
>>>
>>>
>>>
>>>
>>>
>>> Thanks,
>>> Biju
>>> Tel#: 978-707-5066
>>>
>>>
>>> On Wed, Mar 5, 2014 at 1:29 PM, Masatake Iwasaki <
>>> iwasakims@oss.nttdata.co.jp> wrote:
>>>
>>>   Hi Biju,
>>>>
>>>>
>>>>   Trying to understand the process to enable HTrace. Following is the
>>>>>
>>>> change
>>>>
>>>>> to hbase-site.xml
>>>>>      <property>
>>>>>        <name>hbase.trace.spanreceiver.localfilespanreceiver.
>>>>>
>>>> filename</name>
>>>>
>>>>>        <value>/var/log/hbase/htrace.out</value>
>>>>>      </property>
>>>>>
>>>>
>>>> Please try configuration like below.::
>>>>
>>>>     <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>/var/log/hbase/htrace.out</value>
>>>>     </property>
>>>>
>>>> and add lines for receivers initialization to your client code before
>>>> starting trace.::
>>>>
>>>>     import org.apache.hadoop.hbase.trace.SpanReceiverHost;
>>>>     ...
>>>>     private SpanReceiverHost spanReceiverHost;
>>>>     ...
>>>>     spanReceiverHost = SpanReceiverHost.getInstance(conf);
>>>>
>>>> I will file a JIRA to fix documentation later.
>>>>
>>>>
>>>> Regards,
>>>> Masatake Iwasaki
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> (3/5/14, 9:08), Biju G.S Nair wrote:
>>>>
>>>>   Trying to understand the process to enable HTrace. Following is the
>>>>> change
>>>>> to hbase-site.xml
>>>>>      <property>
>>>>>        <name>hbase.trace.spanreceiver.localfilespanreceiver.
>>>>> filename</name>
>>>>>        <value>/var/log/hbase/htrace.out</value>
>>>>>      </property>
>>>>>
>>>>> Following is a simple code to trace a get call
>>>>>
>>>>> public static void main(String[] args) throws IOException {
>>>>>
>>>>>               Configuration conf = HBaseConfiguration.create();
>>>>>
>>>>>              TraceScope getSpan = Trace.startSpan("Gets",
>>>>> Sampler.ALWAYS);
>>>>>
>>>>>        try{
>>>>>
>>>>>              System.out.println("Is tracing on :"+Trace.isTracing());
>>>>>
>>>>>              HTable table = new HTable(conf, "t1");
>>>>>
>>>>>             Get get = new Get(Bytes.toBytes("r1"));
>>>>>
>>>>>             Result res = table.get(get);
>>>>>
>>>>>             System.out.println(res.toString());
>>>>>
>>>>>             table.close();
>>>>>
>>>>>             } catch(Exception e) {
>>>>>
>>>>>                        getSpan.close();
>>>>>
>>>>>             } finally {
>>>>>
>>>>>            getSpan.close();
>>>>>
>>>>>       }
>>>>>
>>>>> }
>>>>> Is something missed
>>>>> ?
>>>>> No trace file is getting
>>>>> generated
>>>>> . Thanks in advance.
>>>>>
>>>>> Thanks,
>>>>> Biju
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>


Re: HTrace

Posted by "Biju G.S Nair" <bi...@acm.org>.
Thanks Ted.

Data is available at http://pastebin.com/dHaBrgw5




Thanks,
Biju
Tel#: 978-707-5066


On Wed, Mar 5, 2014 at 7:44 PM, Ted Yu <yu...@gmail.com> wrote:

> Biju:
> Attachment didn't go through.
>
> Consider using pastebin, etc.
>
>
> On Wed, Mar 5, 2014 at 4:41 PM, Biju G.S Nair <bi...@acm.org> wrote:
>
> > Masatake,
> >     Where you able to use the graphDrawer.py script against the HTrace
> > output. Attached is the output got from my test and didn't generate any
> > image. Any thoughts why? Thanks in advance.
> >
> >
> >
> > - Biju
> >
> >
> >
> > On Wed, Mar 5, 2014 at 4:57 PM, Masatake Iwasaki <
> > iwasakims@oss.nttdata.co.jp> wrote:
> >
> >> Hi Biju,
> >>
> >>
> >> > The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only
> >> in the
> >> > server jar. If we intend to keep the client and server components in
> >> > separate jars this call need to be included in the client jar as well.
> >>
> >> Thanks for your feedback!
> >> I will take this into consideration on fixing docs.
> >>
> >> Regards,
> >> Masatake Iwasaki
> >>
> >>
> >> (3/5/14, 11:51), Biju G.S Nair wrote:
> >>
> >>> Thanks Masatake.
> >>>
> >>> The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only in
> >>> the
> >>> server jar. If we intend to keep the client and server components in
> >>> separate jars this call need to be included in the client jar as well.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Thanks,
> >>> Biju
> >>> Tel#: 978-707-5066
> >>>
> >>>
> >>> On Wed, Mar 5, 2014 at 1:29 PM, Masatake Iwasaki <
> >>> iwasakims@oss.nttdata.co.jp> wrote:
> >>>
> >>>  Hi Biju,
> >>>>
> >>>>
> >>>>  Trying to understand the process to enable HTrace. Following is the
> >>>>>
> >>>> change
> >>>>
> >>>>> to hbase-site.xml
> >>>>>     <property>
> >>>>>       <name>hbase.trace.spanreceiver.localfilespanreceiver.
> >>>>>
> >>>> filename</name>
> >>>>
> >>>>>       <value>/var/log/hbase/htrace.out</value>
> >>>>>     </property>
> >>>>>
> >>>>
> >>>> Please try configuration like below.::
> >>>>
> >>>>    <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>/var/log/hbase/htrace.out</value>
> >>>>    </property>
> >>>>
> >>>> and add lines for receivers initialization to your client code before
> >>>> starting trace.::
> >>>>
> >>>>    import org.apache.hadoop.hbase.trace.SpanReceiverHost;
> >>>>    ...
> >>>>    private SpanReceiverHost spanReceiverHost;
> >>>>    ...
> >>>>    spanReceiverHost = SpanReceiverHost.getInstance(conf);
> >>>>
> >>>> I will file a JIRA to fix documentation later.
> >>>>
> >>>>
> >>>> Regards,
> >>>> Masatake Iwasaki
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> (3/5/14, 9:08), Biju G.S Nair wrote:
> >>>>
> >>>>  Trying to understand the process to enable HTrace. Following is the
> >>>>> change
> >>>>> to hbase-site.xml
> >>>>>     <property>
> >>>>>       <name>hbase.trace.spanreceiver.localfilespanreceiver.
> >>>>> filename</name>
> >>>>>       <value>/var/log/hbase/htrace.out</value>
> >>>>>     </property>
> >>>>>
> >>>>> Following is a simple code to trace a get call
> >>>>>
> >>>>> public static void main(String[] args) throws IOException {
> >>>>>
> >>>>>              Configuration conf = HBaseConfiguration.create();
> >>>>>
> >>>>>             TraceScope getSpan = Trace.startSpan("Gets",
> >>>>> Sampler.ALWAYS);
> >>>>>
> >>>>>       try{
> >>>>>
> >>>>>             System.out.println("Is tracing on :"+Trace.isTracing());
> >>>>>
> >>>>>             HTable table = new HTable(conf, "t1");
> >>>>>
> >>>>>            Get get = new Get(Bytes.toBytes("r1"));
> >>>>>
> >>>>>            Result res = table.get(get);
> >>>>>
> >>>>>            System.out.println(res.toString());
> >>>>>
> >>>>>            table.close();
> >>>>>
> >>>>>            } catch(Exception e) {
> >>>>>
> >>>>>                       getSpan.close();
> >>>>>
> >>>>>            } finally {
> >>>>>
> >>>>>           getSpan.close();
> >>>>>
> >>>>>      }
> >>>>>
> >>>>> }
> >>>>> Is something missed
> >>>>> ?
> >>>>> No trace file is getting
> >>>>> generated
> >>>>> . Thanks in advance.
> >>>>>
> >>>>> Thanks,
> >>>>> Biju
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>
> >>
> >
>

Re: HTrace

Posted by Ted Yu <yu...@gmail.com>.
Biju:
Attachment didn't go through.

Consider using pastebin, etc.


On Wed, Mar 5, 2014 at 4:41 PM, Biju G.S Nair <bi...@acm.org> wrote:

> Masatake,
>     Where you able to use the graphDrawer.py script against the HTrace
> output. Attached is the output got from my test and didn't generate any
> image. Any thoughts why? Thanks in advance.
>
>
>
> - Biju
>
>
>
> On Wed, Mar 5, 2014 at 4:57 PM, Masatake Iwasaki <
> iwasakims@oss.nttdata.co.jp> wrote:
>
>> Hi Biju,
>>
>>
>> > The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only
>> in the
>> > server jar. If we intend to keep the client and server components in
>> > separate jars this call need to be included in the client jar as well.
>>
>> Thanks for your feedback!
>> I will take this into consideration on fixing docs.
>>
>> Regards,
>> Masatake Iwasaki
>>
>>
>> (3/5/14, 11:51), Biju G.S Nair wrote:
>>
>>> Thanks Masatake.
>>>
>>> The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only in
>>> the
>>> server jar. If we intend to keep the client and server components in
>>> separate jars this call need to be included in the client jar as well.
>>>
>>>
>>>
>>>
>>>
>>> Thanks,
>>> Biju
>>> Tel#: 978-707-5066
>>>
>>>
>>> On Wed, Mar 5, 2014 at 1:29 PM, Masatake Iwasaki <
>>> iwasakims@oss.nttdata.co.jp> wrote:
>>>
>>>  Hi Biju,
>>>>
>>>>
>>>>  Trying to understand the process to enable HTrace. Following is the
>>>>>
>>>> change
>>>>
>>>>> to hbase-site.xml
>>>>>     <property>
>>>>>       <name>hbase.trace.spanreceiver.localfilespanreceiver.
>>>>>
>>>> filename</name>
>>>>
>>>>>       <value>/var/log/hbase/htrace.out</value>
>>>>>     </property>
>>>>>
>>>>
>>>> Please try configuration like below.::
>>>>
>>>>    <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>/var/log/hbase/htrace.out</value>
>>>>    </property>
>>>>
>>>> and add lines for receivers initialization to your client code before
>>>> starting trace.::
>>>>
>>>>    import org.apache.hadoop.hbase.trace.SpanReceiverHost;
>>>>    ...
>>>>    private SpanReceiverHost spanReceiverHost;
>>>>    ...
>>>>    spanReceiverHost = SpanReceiverHost.getInstance(conf);
>>>>
>>>> I will file a JIRA to fix documentation later.
>>>>
>>>>
>>>> Regards,
>>>> Masatake Iwasaki
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> (3/5/14, 9:08), Biju G.S Nair wrote:
>>>>
>>>>  Trying to understand the process to enable HTrace. Following is the
>>>>> change
>>>>> to hbase-site.xml
>>>>>     <property>
>>>>>       <name>hbase.trace.spanreceiver.localfilespanreceiver.
>>>>> filename</name>
>>>>>       <value>/var/log/hbase/htrace.out</value>
>>>>>     </property>
>>>>>
>>>>> Following is a simple code to trace a get call
>>>>>
>>>>> public static void main(String[] args) throws IOException {
>>>>>
>>>>>              Configuration conf = HBaseConfiguration.create();
>>>>>
>>>>>             TraceScope getSpan = Trace.startSpan("Gets",
>>>>> Sampler.ALWAYS);
>>>>>
>>>>>       try{
>>>>>
>>>>>             System.out.println("Is tracing on :"+Trace.isTracing());
>>>>>
>>>>>             HTable table = new HTable(conf, "t1");
>>>>>
>>>>>            Get get = new Get(Bytes.toBytes("r1"));
>>>>>
>>>>>            Result res = table.get(get);
>>>>>
>>>>>            System.out.println(res.toString());
>>>>>
>>>>>            table.close();
>>>>>
>>>>>            } catch(Exception e) {
>>>>>
>>>>>                       getSpan.close();
>>>>>
>>>>>            } finally {
>>>>>
>>>>>           getSpan.close();
>>>>>
>>>>>      }
>>>>>
>>>>> }
>>>>> Is something missed
>>>>> ?
>>>>> No trace file is getting
>>>>> generated
>>>>> . Thanks in advance.
>>>>>
>>>>> Thanks,
>>>>> Biju
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: HTrace

Posted by "Biju G.S Nair" <bi...@acm.org>.
Masatake,
    Where you able to use the graphDrawer.py script against the HTrace
output. Attached is the output got from my test and didn't generate any
image. Any thoughts why? Thanks in advance.



- Biju



On Wed, Mar 5, 2014 at 4:57 PM, Masatake Iwasaki <
iwasakims@oss.nttdata.co.jp> wrote:

> Hi Biju,
>
>
> > The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only in
> the
> > server jar. If we intend to keep the client and server components in
> > separate jars this call need to be included in the client jar as well.
>
> Thanks for your feedback!
> I will take this into consideration on fixing docs.
>
> Regards,
> Masatake Iwasaki
>
>
> (3/5/14, 11:51), Biju G.S Nair wrote:
>
>> Thanks Masatake.
>>
>> The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only in
>> the
>> server jar. If we intend to keep the client and server components in
>> separate jars this call need to be included in the client jar as well.
>>
>>
>>
>>
>>
>> Thanks,
>> Biju
>> Tel#: 978-707-5066
>>
>>
>> On Wed, Mar 5, 2014 at 1:29 PM, Masatake Iwasaki <
>> iwasakims@oss.nttdata.co.jp> wrote:
>>
>>  Hi Biju,
>>>
>>>
>>>  Trying to understand the process to enable HTrace. Following is the
>>>>
>>> change
>>>
>>>> to hbase-site.xml
>>>>     <property>
>>>>       <name>hbase.trace.spanreceiver.localfilespanreceiver.
>>>>
>>> filename</name>
>>>
>>>>       <value>/var/log/hbase/htrace.out</value>
>>>>     </property>
>>>>
>>>
>>> Please try configuration like below.::
>>>
>>>    <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>/var/log/hbase/htrace.out</value>
>>>    </property>
>>>
>>> and add lines for receivers initialization to your client code before
>>> starting trace.::
>>>
>>>    import org.apache.hadoop.hbase.trace.SpanReceiverHost;
>>>    ...
>>>    private SpanReceiverHost spanReceiverHost;
>>>    ...
>>>    spanReceiverHost = SpanReceiverHost.getInstance(conf);
>>>
>>> I will file a JIRA to fix documentation later.
>>>
>>>
>>> Regards,
>>> Masatake Iwasaki
>>>
>>>
>>>
>>>
>>>
>>> (3/5/14, 9:08), Biju G.S Nair wrote:
>>>
>>>  Trying to understand the process to enable HTrace. Following is the
>>>> change
>>>> to hbase-site.xml
>>>>     <property>
>>>>       <name>hbase.trace.spanreceiver.localfilespanreceiver.
>>>> filename</name>
>>>>       <value>/var/log/hbase/htrace.out</value>
>>>>     </property>
>>>>
>>>> Following is a simple code to trace a get call
>>>>
>>>> public static void main(String[] args) throws IOException {
>>>>
>>>>              Configuration conf = HBaseConfiguration.create();
>>>>
>>>>             TraceScope getSpan = Trace.startSpan("Gets",
>>>> Sampler.ALWAYS);
>>>>
>>>>       try{
>>>>
>>>>             System.out.println("Is tracing on :"+Trace.isTracing());
>>>>
>>>>             HTable table = new HTable(conf, "t1");
>>>>
>>>>            Get get = new Get(Bytes.toBytes("r1"));
>>>>
>>>>            Result res = table.get(get);
>>>>
>>>>            System.out.println(res.toString());
>>>>
>>>>            table.close();
>>>>
>>>>            } catch(Exception e) {
>>>>
>>>>                       getSpan.close();
>>>>
>>>>            } finally {
>>>>
>>>>           getSpan.close();
>>>>
>>>>      }
>>>>
>>>> }
>>>> Is something missed
>>>> ?
>>>> No trace file is getting
>>>> generated
>>>> . Thanks in advance.
>>>>
>>>> Thanks,
>>>> Biju
>>>>
>>>>
>>>>
>>>
>>
>

Re: HTrace

Posted by Masatake Iwasaki <iw...@oss.nttdata.co.jp>.
Hi Biju,

 > The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only in the
 > server jar. If we intend to keep the client and server components in
 > separate jars this call need to be included in the client jar as well.

Thanks for your feedback!
I will take this into consideration on fixing docs.

Regards,
Masatake Iwasaki

(3/5/14, 11:51), Biju G.S Nair wrote:
> Thanks Masatake.
>
> The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only in the
> server jar. If we intend to keep the client and server components in
> separate jars this call need to be included in the client jar as well.
>
>
>
>
>
> Thanks,
> Biju
> Tel#: 978-707-5066
>
>
> On Wed, Mar 5, 2014 at 1:29 PM, Masatake Iwasaki <
> iwasakims@oss.nttdata.co.jp> wrote:
>
>> Hi Biju,
>>
>>
>>> Trying to understand the process to enable HTrace. Following is the
>> change
>>> to hbase-site.xml
>>>     <property>
>>>       <name>hbase.trace.spanreceiver.localfilespanreceiver.
>> filename</name>
>>>       <value>/var/log/hbase/htrace.out</value>
>>>     </property>
>>
>> Please try configuration like below.::
>>
>>    <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>/var/log/hbase/htrace.out</value>
>>    </property>
>>
>> and add lines for receivers initialization to your client code before
>> starting trace.::
>>
>>    import org.apache.hadoop.hbase.trace.SpanReceiverHost;
>>    ...
>>    private SpanReceiverHost spanReceiverHost;
>>    ...
>>    spanReceiverHost = SpanReceiverHost.getInstance(conf);
>>
>> I will file a JIRA to fix documentation later.
>>
>>
>> Regards,
>> Masatake Iwasaki
>>
>>
>>
>>
>>
>> (3/5/14, 9:08), Biju G.S Nair wrote:
>>
>>> Trying to understand the process to enable HTrace. Following is the change
>>> to hbase-site.xml
>>>     <property>
>>>       <name>hbase.trace.spanreceiver.localfilespanreceiver.filename</name>
>>>       <value>/var/log/hbase/htrace.out</value>
>>>     </property>
>>>
>>> Following is a simple code to trace a get call
>>>
>>> public static void main(String[] args) throws IOException {
>>>
>>>              Configuration conf = HBaseConfiguration.create();
>>>
>>>             TraceScope getSpan = Trace.startSpan("Gets", Sampler.ALWAYS);
>>>
>>>       try{
>>>
>>>             System.out.println("Is tracing on :"+Trace.isTracing());
>>>
>>>             HTable table = new HTable(conf, "t1");
>>>
>>>            Get get = new Get(Bytes.toBytes("r1"));
>>>
>>>            Result res = table.get(get);
>>>
>>>            System.out.println(res.toString());
>>>
>>>            table.close();
>>>
>>>            } catch(Exception e) {
>>>
>>>                       getSpan.close();
>>>
>>>            } finally {
>>>
>>>           getSpan.close();
>>>
>>>      }
>>>
>>> }
>>> Is something missed
>>> ?
>>> No trace file is getting
>>> generated
>>> . Thanks in advance.
>>>
>>> Thanks,
>>> Biju
>>>
>>>
>>
>


Re: HTrace

Posted by "Biju G.S Nair" <bi...@acm.org>.
Thanks Masatake.

The org.apache.hadoop.hbase.trace.SpanReceiverHost is available only in the
server jar. If we intend to keep the client and server components in
separate jars this call need to be included in the client jar as well.





Thanks,
Biju
Tel#: 978-707-5066


On Wed, Mar 5, 2014 at 1:29 PM, Masatake Iwasaki <
iwasakims@oss.nttdata.co.jp> wrote:

> Hi Biju,
>
>
> > Trying to understand the process to enable HTrace. Following is the
> change
> > to hbase-site.xml
> >    <property>
> >      <name>hbase.trace.spanreceiver.localfilespanreceiver.
> filename</name>
> >      <value>/var/log/hbase/htrace.out</value>
> >    </property>
>
> Please try configuration like below.::
>
>   <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>/var/log/hbase/htrace.out</value>
>   </property>
>
> and add lines for receivers initialization to your client code before
> starting trace.::
>
>   import org.apache.hadoop.hbase.trace.SpanReceiverHost;
>   ...
>   private SpanReceiverHost spanReceiverHost;
>   ...
>   spanReceiverHost = SpanReceiverHost.getInstance(conf);
>
> I will file a JIRA to fix documentation later.
>
>
> Regards,
> Masatake Iwasaki
>
>
>
>
>
> (3/5/14, 9:08), Biju G.S Nair wrote:
>
>> Trying to understand the process to enable HTrace. Following is the change
>> to hbase-site.xml
>>    <property>
>>      <name>hbase.trace.spanreceiver.localfilespanreceiver.filename</name>
>>      <value>/var/log/hbase/htrace.out</value>
>>    </property>
>>
>> Following is a simple code to trace a get call
>>
>> public static void main(String[] args) throws IOException {
>>
>>             Configuration conf = HBaseConfiguration.create();
>>
>>            TraceScope getSpan = Trace.startSpan("Gets", Sampler.ALWAYS);
>>
>>      try{
>>
>>            System.out.println("Is tracing on :"+Trace.isTracing());
>>
>>            HTable table = new HTable(conf, "t1");
>>
>>           Get get = new Get(Bytes.toBytes("r1"));
>>
>>           Result res = table.get(get);
>>
>>           System.out.println(res.toString());
>>
>>           table.close();
>>
>>           } catch(Exception e) {
>>
>>                      getSpan.close();
>>
>>           } finally {
>>
>>          getSpan.close();
>>
>>     }
>>
>> }
>> Is something missed
>> ?
>> No trace file is getting
>> generated
>> . Thanks in advance.
>>
>> Thanks,
>> Biju
>>
>>
>

Re: HTrace

Posted by Masatake Iwasaki <iw...@oss.nttdata.co.jp>.
Hi Biju,

 > Trying to understand the process to enable HTrace. Following is the change
 > to hbase-site.xml
 >    <property>
 >      <name>hbase.trace.spanreceiver.localfilespanreceiver.filename</name>
 >      <value>/var/log/hbase/htrace.out</value>
 >    </property>

Please try configuration like below.::

   <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>/var/log/hbase/htrace.out</value>
   </property>

and add lines for receivers initialization to your client code before starting trace.::

   import org.apache.hadoop.hbase.trace.SpanReceiverHost;
   ...
   private SpanReceiverHost spanReceiverHost;
   ...
   spanReceiverHost = SpanReceiverHost.getInstance(conf);

I will file a JIRA to fix documentation later.


Regards,
Masatake Iwasaki




(3/5/14, 9:08), Biju G.S Nair wrote:
> Trying to understand the process to enable HTrace. Following is the change
> to hbase-site.xml
>    <property>
>      <name>hbase.trace.spanreceiver.localfilespanreceiver.filename</name>
>      <value>/var/log/hbase/htrace.out</value>
>    </property>
>
> Following is a simple code to trace a get call
>
> public static void main(String[] args) throws IOException {
>
>             Configuration conf = HBaseConfiguration.create();
>
>            TraceScope getSpan = Trace.startSpan("Gets", Sampler.ALWAYS);
>
>      try{
>
>            System.out.println("Is tracing on :"+Trace.isTracing());
>
>            HTable table = new HTable(conf, "t1");
>
>           Get get = new Get(Bytes.toBytes("r1"));
>
>           Result res = table.get(get);
>
>           System.out.println(res.toString());
>
>           table.close();
>
>           } catch(Exception e) {
>
>                      getSpan.close();
>
>           } finally {
>
>          getSpan.close();
>
>     }
>
> }
> Is something missed
> ?
> No trace file is getting
> generated
> . Thanks in advance.
>
> Thanks,
> Biju
>