Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E437E10B4B for ; Wed, 5 Mar 2014 19:52:36 +0000 (UTC) Received: (qmail 44385 invoked by uid 500); 5 Mar 2014 19:52:34 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 44331 invoked by uid 500); 5 Mar 2014 19:52:34 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 44323 invoked by uid 99); 5 Mar 2014 19:52:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2014 19:52:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gs.biju@gmail.com designates 209.85.220.174 as permitted sender) Received: from [209.85.220.174] (HELO mail-vc0-f174.google.com) (209.85.220.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2014 19:52:27 +0000 Received: by mail-vc0-f174.google.com with SMTP id im17so1539353vcb.5 for ; Wed, 05 Mar 2014 11:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=cNiG2LrwFk63DddXlUslYVUYLfmHoSzIKJ2H7nuqFx4=; b=A/DRBfqacheXXb8Ve0Q8A/AUPm7FqMob65A9r2VQtlxfKml5hgEOzfDsb9tp6z78Qv 00GR9w2BUezjdmM54BTrr83Hqg6fe5qVqeqweL5maTXjmilxB3tON9x6oP0gKgfgY/hp w4UiNKrqM7b20cgc5T6KyrmV4F/m7aYKLrJKPdRIw1E4PyojsMOVBBlYc/+T4DiDUiPi AcWSBpIlqFeWSQQc1Vz9XZaZVM26QWVuFxG4eiqYbzEGxy/upaYzJAWAlERhQkd1xZVK jwSZmWTMdADaZR1LN/ofahmioCr4eo296BSpz4roWz1szZQO9s9jOX9rkWubBJDjtcJ7 u+wg== X-Received: by 10.220.147.16 with SMTP id j16mr1431345vcv.28.1394049126675; Wed, 05 Mar 2014 11:52:06 -0800 (PST) MIME-Version: 1.0 Sender: gs.biju@gmail.com Received: by 10.220.253.10 with HTTP; Wed, 5 Mar 2014 11:51:46 -0800 (PST) In-Reply-To: <53176CEF.6030806@oss.nttdata.co.jp> References: <53176CEF.6030806@oss.nttdata.co.jp> From: "Biju G.S Nair" Date: Wed, 5 Mar 2014 14:51:46 -0500 X-Google-Sender-Auth: YBqg08R-bxdjbNkLuHr2wBfdq3g Message-ID: Subject: Re: HTrace To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=047d7b3436d2febc0f04f3e15aad X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3436d2febc0f04f3e15aad Content-Type: text/plain; charset=ISO-8859-1 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 > > > > hbase.trace.spanreceiver.localfilespanreceiver. > filename > > /var/log/hbase/htrace.out > > > > Please try configuration like below.:: > > > hbase.trace.spanreceiver.classes > org.cloudera.htrace.impl.LocalFileSpanReceiver > > > > hbase.local-file-span-receiver.path > /var/log/hbase/htrace.out > > > 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 >> >> hbase.trace.spanreceiver.localfilespanreceiver.filename >> /var/log/hbase/htrace.out >> >> >> 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 >> >> > --047d7b3436d2febc0f04f3e15aad--