Modified: phoenix/site/publish/roadmap.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/roadmap.html?rev=1618075&r1=1618074&r2=1618075&view=diff
==============================================================================
--- phoenix/site/publish/roadmap.html (original)
+++ phoenix/site/publish/roadmap.html Thu Aug 14 22:21:43 2014
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2014-06-05
+ Generated by Apache Maven Doxia at 2014-08-14
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -88,6 +88,7 @@
                                                                        <li ><a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a></li>
                                                                        <li ><a 
href="skip_scan.html" title="Skip Scan">Skip Scan</a></li>
                                                                        <li ><a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a></li>
+                                                                       <li ><a 
href="tracing.html" title="Request Tracing">Request Tracing</a></li>
                                                                        <li 
class="divider"/>
                                                                        <li ><a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR 
Support</a></li>
                                                                        <li ><a 
href="flume.html" title="Apache Flume Plugin">Apache Flume Plugin</a></li>
@@ -280,6 +281,9 @@
                                                        <a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a>
                                                </li>
                                                <li >
+                                                       <a href="tracing.html" 
title="Request Tracing">Request Tracing</a>
+                                               </li>
+                                               <li >
                                                        <a href="http:divider" 
title=""></a>
                                                </li>
                                                <li >

Modified: phoenix/site/publish/salted.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/salted.html?rev=1618075&r1=1618074&r2=1618075&view=diff
==============================================================================
--- phoenix/site/publish/salted.html (original)
+++ phoenix/site/publish/salted.html Thu Aug 14 22:21:43 2014
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2014-06-03
+ Generated by Apache Maven Doxia at 2014-08-14
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -88,6 +88,7 @@
                                                                        <li ><a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a></li>
                                                                        <li ><a 
href="skip_scan.html" title="Skip Scan">Skip Scan</a></li>
                                                                        <li ><a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a></li>
+                                                                       <li ><a 
href="tracing.html" title="Request Tracing">Request Tracing</a></li>
                                                                        <li 
class="divider"/>
                                                                        <li ><a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR 
Support</a></li>
                                                                        <li ><a 
href="flume.html" title="Apache Flume Plugin">Apache Flume Plugin</a></li>
@@ -267,6 +268,9 @@
                                                        <a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a>
                                                </li>
                                                <li >
+                                                       <a href="tracing.html" 
title="Request Tracing">Request Tracing</a>
+                                               </li>
+                                               <li >
                                                        <a href="http:divider" 
title=""></a>
                                                </li>
                                                <li >

Modified: phoenix/site/publish/secondary_indexing.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/secondary_indexing.html?rev=1618075&r1=1618074&r2=1618075&view=diff
==============================================================================
--- phoenix/site/publish/secondary_indexing.html (original)
+++ phoenix/site/publish/secondary_indexing.html Thu Aug 14 22:21:43 2014
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2014-08-12
+ Generated by Apache Maven Doxia at 2014-08-14
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -88,6 +88,7 @@
                                                                        <li ><a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a></li>
                                                                        <li ><a 
href="skip_scan.html" title="Skip Scan">Skip Scan</a></li>
                                                                        <li ><a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a></li>
+                                                                       <li ><a 
href="tracing.html" title="Request Tracing">Request Tracing</a></li>
                                                                        <li 
class="divider"/>
                                                                        <li ><a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR 
Support</a></li>
                                                                        <li ><a 
href="flume.html" title="Apache Flume Plugin">Apache Flume Plugin</a></li>
@@ -454,6 +455,9 @@
                                                        <a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a>
                                                </li>
                                                <li >
+                                                       <a href="tracing.html" 
title="Request Tracing">Request Tracing</a>
+                                               </li>
+                                               <li >
                                                        <a href="http:divider" 
title=""></a>
                                                </li>
                                                <li >

Modified: phoenix/site/publish/sequences.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/sequences.html?rev=1618075&r1=1618074&r2=1618075&view=diff
==============================================================================
--- phoenix/site/publish/sequences.html (original)
+++ phoenix/site/publish/sequences.html Thu Aug 14 22:21:43 2014
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2014-06-03
+ Generated by Apache Maven Doxia at 2014-08-14
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -88,6 +88,7 @@
                                                                        <li ><a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a></li>
                                                                        <li ><a 
href="skip_scan.html" title="Skip Scan">Skip Scan</a></li>
                                                                        <li ><a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a></li>
+                                                                       <li ><a 
href="tracing.html" title="Request Tracing">Request Tracing</a></li>
                                                                        <li 
class="divider"/>
                                                                        <li ><a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR 
Support</a></li>
                                                                        <li ><a 
href="flume.html" title="Apache Flume Plugin">Apache Flume Plugin</a></li>
@@ -291,6 +292,9 @@ VALUES( NEXT VALUE FOR my_schema.my_sequ
                                                        <a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a>
                                                </li>
                                                <li >
+                                                       <a href="tracing.html" 
title="Request Tracing">Request Tracing</a>
+                                               </li>
+                                               <li >
                                                        <a href="http:divider" 
title=""></a>
                                                </li>
                                                <li >

Modified: phoenix/site/publish/skip_scan.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/skip_scan.html?rev=1618075&r1=1618074&r2=1618075&view=diff
==============================================================================
--- phoenix/site/publish/skip_scan.html (original)
+++ phoenix/site/publish/skip_scan.html Thu Aug 14 22:21:43 2014
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2014-06-03
+ Generated by Apache Maven Doxia at 2014-08-14
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -88,6 +88,7 @@
                                                                        <li ><a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a></li>
                                                                        <li 
class="active"><a href="" title="Skip Scan">Skip Scan</a></li>
                                                                        <li ><a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a></li>
+                                                                       <li ><a 
href="tracing.html" title="Request Tracing">Request Tracing</a></li>
                                                                        <li 
class="divider"/>
                                                                        <li ><a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR 
Support</a></li>
                                                                        <li ><a 
href="flume.html" title="Apache Flume Plugin">Apache Flume Plugin</a></li>
@@ -256,6 +257,9 @@ AND KEY2 IN (1, 2)
                                                        <a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a>
                                                </li>
                                                <li >
+                                                       <a href="tracing.html" 
title="Request Tracing">Request Tracing</a>
+                                               </li>
+                                               <li >
                                                        <a href="http:divider" 
title=""></a>
                                                </li>
                                                <li >

Modified: phoenix/site/publish/source.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/source.html?rev=1618075&r1=1618074&r2=1618075&view=diff
==============================================================================
--- phoenix/site/publish/source.html (original)
+++ phoenix/site/publish/source.html Thu Aug 14 22:21:43 2014
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2014-06-03
+ Generated by Apache Maven Doxia at 2014-08-14
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -88,6 +88,7 @@
                                                                        <li ><a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a></li>
                                                                        <li ><a 
href="skip_scan.html" title="Skip Scan">Skip Scan</a></li>
                                                                        <li ><a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a></li>
+                                                                       <li ><a 
href="tracing.html" title="Request Tracing">Request Tracing</a></li>
                                                                        <li 
class="divider"/>
                                                                        <li ><a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR 
Support</a></li>
                                                                        <li ><a 
href="flume.html" title="Apache Flume Plugin">Apache Flume Plugin</a></li>
@@ -259,6 +260,9 @@
                                                        <a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a>
                                                </li>
                                                <li >
+                                                       <a href="tracing.html" 
title="Request Tracing">Request Tracing</a>
+                                               </li>
+                                               <li >
                                                        <a href="http:divider" 
title=""></a>
                                                </li>
                                                <li >

Modified: phoenix/site/publish/team.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/team.html?rev=1618075&r1=1618074&r2=1618075&view=diff
==============================================================================
--- phoenix/site/publish/team.html (original)
+++ phoenix/site/publish/team.html Thu Aug 14 22:21:43 2014
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2014-07-19
+ Generated by Apache Maven Doxia at 2014-08-14
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -88,6 +88,7 @@
                                                                        <li ><a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a></li>
                                                                        <li ><a 
href="skip_scan.html" title="Skip Scan">Skip Scan</a></li>
                                                                        <li ><a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a></li>
+                                                                       <li ><a 
href="tracing.html" title="Request Tracing">Request Tracing</a></li>
                                                                        <li 
class="divider"/>
                                                                        <li ><a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR 
Support</a></li>
                                                                        <li ><a 
href="flume.html" title="Apache Flume Plugin">Apache Flume Plugin</a></li>
@@ -365,6 +366,9 @@
                                                        <a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a>
                                                </li>
                                                <li >
+                                                       <a href="tracing.html" 
title="Request Tracing">Request Tracing</a>
+                                               </li>
+                                               <li >
                                                        <a href="http:divider" 
title=""></a>
                                                </li>
                                                <li >

Added: phoenix/site/publish/tracing.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/tracing.html?rev=1618075&view=auto
==============================================================================
--- phoenix/site/publish/tracing.html (added)
+++ phoenix/site/publish/tracing.html Thu Aug 14 22:21:43 2014
@@ -0,0 +1,404 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2014-08-14
+ Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+       <head>
+               <meta charset="UTF-8" />
+               <title>Tracing | Apache Phoenix</title>
+               <meta name="viewport" content="width=device-width, 
initial-scale=1.0" />
+               <meta name="description" content="" />
+               <meta http-equiv="content-language" content="en" />
+
+               <link 
href="http://netdna.bootstrapcdn.com/bootswatch/2.3.2/united/bootstrap.min.css"; 
rel="stylesheet" />
+               <link 
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css";
 rel="stylesheet" />
+               <link href="./css/bootswatch.css" rel="stylesheet" />
+               <link href="./css/reflow-skin.css" rel="stylesheet" />
+
+               <link 
href="http://yandex.st/highlightjs/7.5/styles/default.min.css"; rel="stylesheet" 
/>
+               
+               <link href="./css/lightbox.css" rel="stylesheet" />
+               
+               <link href="./css/site.css" rel="stylesheet" />
+               <link href="./css/print.css" rel="stylesheet" media="print" />
+               
+               <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+               <!--[if lt IE 9]>
+                       <script 
src="http://html5shim.googlecode.com/svn/trunk/html5.js";></script>
+               <![endif]-->
+
+
+
+       </head>
+
+       <body class="page-tracing project-phoenix-site" data-spy="scroll" 
data-offset="60" data-target="#toc-scroll-target">
+
+               <div class="navbar navbar-fixed-top">
+                       <div class="navbar-inner">
+                               <div class="container">
+                                       <a class="btn btn-navbar" 
data-toggle="collapse" data-target="#top-nav-collapse">
+                                               <span class="icon-bar"></span>
+                                               <span class="icon-bar"></span>
+                                               <span class="icon-bar"></span>
+                                       </a>
+                                       <a class="brand" href="index.html"><div 
class="xtoplogo"></div></a>
+                                       <div class="nav-collapse collapse" 
id="top-nav-collapse">
+                                               <ul class="nav pull-right">
+                                                       <li class="dropdown">
+                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">About <b class="caret"></b></a>
+                                                               <ul 
class="dropdown-menu">
+                                                                       <li ><a 
href="index.html" title="Overview">Overview</a></li>
+                                                                       <li ><a 
href="recent.html" title="New Features">New Features</a></li>
+                                                                       <li ><a 
href="roadmap.html" title="Roadmap">Roadmap</a></li>
+                                                                       <li ><a 
href="performance.html" title="Performance">Performance</a></li>
+                                                                       <li ><a 
href="team.html" title="Team">Team</a></li>
+                                                                       <li ><a 
href="contributing.html" title="Contributing">Contributing</a></li>
+                                                                       <li ><a 
href="resources.html" title="Resources">Resources</a></li>
+                                                                       <li ><a 
href="mailing_list.html" title="Mailing Lists">Mailing Lists</a></li>
+                                                                       <li ><a 
href="source.html" title="Source Repository">Source Repository</a></li>
+                                                                       <li ><a 
href="issues.html" title="Issue Tracking">Issue Tracking</a></li>
+                                                                       <li ><a 
href="download.html" title="Download">Download</a></li>
+                                                                       <li 
class="divider"/>
+                                                                       <li ><a 
href="http://www.apache.org/licenses/"; title="License" 
class="externalLink">License</a></li>
+                                                                       <li ><a 
href="http://www.apache.org/foundation/sponsorship.html"; title="Sponsorship" 
class="externalLink">Sponsorship</a></li>
+                                                                       <li ><a 
href="http://www.apache.org/foundation/thanks.html"; title="Thanks" 
class="externalLink">Thanks</a></li>
+                                                                       <li ><a 
href="http://www.apache.org/security/"; title="Security" 
class="externalLink">Security</a></li>
+                                                               </ul>
+                                                       </li>
+                                                       <li class="dropdown">
+                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Using <b class="caret"></b></a>
+                                                               <ul 
class="dropdown-menu">
+                                                                       <li ><a 
href="faq.html" title="F.A.Q.">F.A.Q.</a></li>
+                                                                       <li ><a 
href="Phoenix-in-15-minutes-or-less.html" title="Quick Start">Quick 
Start</a></li>
+                                                                       <li ><a 
href="building.html" title="Building">Building</a></li>
+                                                                       <li ><a 
href="tuning.html" title="Tuning">Tuning</a></li>
+                                                                       <li ><a 
href="upgrade_from_2_2.html" title="Upgrade from 2.2">Upgrade from 2.2</a></li>
+                                                                       <li 
class="divider"/>
+                                                                       <li ><a 
href="secondary_indexing.html" title="Secondary Indexes">Secondary 
Indexes</a></li>
+                                                                       <li ><a 
href="joins.html" title="Joins">Joins</a></li>
+                                                                       <li ><a 
href="views.html" title="Views">Views</a></li>
+                                                                       <li ><a 
href="multi-tenancy.html" title="Multi tenancy">Multi tenancy</a></li>
+                                                                       <li ><a 
href="sequences.html" title="Sequences">Sequences</a></li>
+                                                                       <li ><a 
href="array_type.html" title="ARRAY type">ARRAY type</a></li>
+                                                                       <li ><a 
href="salted.html" title="Salted Tables">Salted Tables</a></li>
+                                                                       <li ><a 
href="paged.html" title="Paged Queries">Paged Queries</a></li>
+                                                                       <li ><a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a></li>
+                                                                       <li ><a 
href="skip_scan.html" title="Skip Scan">Skip Scan</a></li>
+                                                                       <li ><a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a></li>
+                                                                       <li 
class="active"><a href="" title="Request Tracing">Request Tracing</a></li>
+                                                                       <li 
class="divider"/>
+                                                                       <li ><a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR 
Support</a></li>
+                                                                       <li ><a 
href="flume.html" title="Apache Flume Plugin">Apache Flume Plugin</a></li>
+                                                                       <li ><a 
href="pig_integration.html" title="Apache Pig Integration">Apache Pig 
Integration</a></li>
+                                                               </ul>
+                                                       </li>
+                                                       <li class="dropdown">
+                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Reference <b 
class="caret"></b></a>
+                                                               <ul 
class="dropdown-menu">
+                                                                       <li ><a 
href="language/index.html" title="Grammar">Grammar</a></li>
+                                                                       <li ><a 
href="language/functions.html" title="Functions">Functions</a></li>
+                                                                       <li ><a 
href="language/datatypes.html" title="Datatypes">Datatypes</a></li>
+                                                               </ul>
+                                                       </li>
+                                               </ul>
+                                       </div><!--/.nav-collapse -->
+                               </div>
+                       </div>
+               </div>
+               
+       <div class="container">
+       
+       <!-- Masthead
+       ================================================== -->
+
+       <header>
+       </header>
+
+       <div class="main-body">
+       <div class="row">
+               <div class="span12">
+                       <div class="body-content">
+<div class="page-header">
+ <h1>Tracing</h1>
+</div> 
+<p>As of Phoenix 4.1.0 we have added the ability to collect per-request 
traces. This allows you to see each important step in a query or insertion, all 
they way from the client through into the HBase side, and back again.</p> 
+<p>We leverage Cloudera’s <a class="externalLink" 
href="https://github.com/cloudera/htrace";>HTrace</a> library to seamlessly 
integrate with HBase’s tracing utilities. We then take it a step further by 
then depositing these metrics into a Hadoop metrics2 sink that writes them into 
a phoenix table.</p> 
+<p><b>Writing traces to a phoenix table is not supported on Hadoop1</b></p> 
+<div class="section"> 
+ <h2 id="Usage">Usage</h2> 
+ <p>There are only a couple small things you need to do to enable tracing a 
given request with Phoenix.</p> 
+ <div class="section"> 
+  <h3 id="Client_Property">Client Property</h3> 
+  <p>The frequency of tracing is determined by the client JDBC property:</p> 
+  <div class="source"> 
+   <pre>org.apache.phoenix.trace.frequency
+</pre> 
+  </div> 
+  <p>There are three possible tracing frequencies you can use:</p> 
+  <ol style="list-style-type: decimal"> 
+   <li>never 
+    <ul> 
+     <li>This is the default</li> 
+    </ul></li> 
+   <li>always 
+    <ul> 
+     <li>Every request will be traced</li> 
+    </ul></li> 
+   <li>probability 
+    <ul> 
+     <li>take traces with a probabilistic frequency</li> 
+     <li>probability threshold set by: 
“com.salesforce.phoenix.trace.probability.threshold”</li> 
+    </ul></li> 
+  </ol> 
+  <p>By turning one of these properties on, you turn on merely collecting the 
traces. However, the traces need to be deposited somewhere</p> 
+  <p>Example:</p> 
+  <div class="source"> 
+   <pre># Enable tracing on every request
+Properties props = new Properties();
+props.setProperty(&quot;org.apache.phoenix.trace.frequency&quot;, 
&quot;always&quot;);
+
+# Or more simply
+org.apache.phoenix.trace.Tracing.setSampling(props, Tracing.Frequency.ALWAYS);
+
+# Enable tracing on 50% of requests
+org.apache.phoenix.trace.Tracing.setSampling(props, Tracing.Frequency.ALWAYS);
+props.setProperty(&quot;com.salesforce.phoenix.trace.probability.threshold&quot;,
 .5)
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Enabling_TracingMetrics2_Sink">Enabling Tracing/Metrics2 Sink</h3> 
+  <p>This is where the traces are taken from the tracing framework and then 
deposited into a Phoenix table. Because the traces are transported through the 
Hadoop metrics2 framework, you need to add the following configs to your 
hadoop-metrics2.properties (or hadoop-metrics2-phoenix.properties) file on the 
classpath of both the * phoenix client* and <i>HBase regionservers</i>, and 
then restart all necessary processes to get them to pick up the configs.</p> 
+  <div class="source"> 
+   <pre># Hadoop2 metrics sink
+phoenix.sink.*.class=org.apache.phoenix.trace.PhoenixMetricsWriter
+# Writer that generically writes to phoenix tables
+phoenix.sink.writer-class=org.apache.phoenix.trace.PhoenixTableMetricsWriter
+</pre> 
+  </div> 
+ </div> 
+</div> 
+<div class="section"> 
+ <h2 id="Reading_Traces">Reading Traces</h2> 
+ <p>Once the traces are deposited into the tracing table, by default 
“PHOENIX.TRACING_STATS”, but it is configurable in the HBase configuration 
via:</p> 
+ <div class="source"> 
+  <pre>  &lt;property&gt;
+    &lt;name&gt;rg.apache.phoenix._internal.trace.tablename&lt;/name&gt;
+    &lt;value&gt;&lt;your custom tracing table name&gt;&lt;/value&gt;
+  &lt;/property&gt;
+</pre> 
+ </div> 
+ <p>The tracing table is initialized via the ddl:</p> 
+ <div class="source"> 
+  <pre>&quot;create table if not exists &quot; + table + &quot;( &quot; + 
+  &quot;trace_id bigint not null, &quot; +
+  &quot;parent_id bigint not null, &quot; +
+  &quot;span_id bigint not null, &quot; +
+  &quot;description varchar, &quot; +
+  &quot;star_time bigint, &quot; +
+  &quot;end_time bigint, &quot; +
+  &quot;hostname varchar, &quot; +
+  # column for the number of tags
+  &quot;tags.count smallint, &quot; + 
+  # column for the number of annotations
+  &quot;annotations.count smallint&quot; +
+  &quot;  CONSTRAINT pk PRIMARY KEY (trace_id, parent_id, span_id)&quot;
+</pre> 
+ </div> 
+ <p>And contains a number of dynamic columns as each trace, identified by a 
unique trace-id (id of the request), parent-id (id of the parent span) and 
individual span-id (id of the individual segment), may have multiple tags and 
annotations about what happened during the trace. Once you have the number of 
tags and annotations, you can retrieve them the table with a request like:</p> 
+ <div class="source"> 
+  <pre>&quot;SELECT &quot; + columns + &quot; from &quot; 
+  + table + &quot;(&quot; + columns + &quot;) WHERE &quot;
+  + &quot;trace_id=&quot; + traceid + &quot; AND &quot;
+  + &quot;parent_id=&quot; + parent + &quot; AND &quot;
+  + &quot;span_id=&quot; + span
+</pre> 
+ </div> 
+ <p>where columns is either “annotations.aX” or “tags.tX” where 
‘X’ is the index of the dynamic column to lookup.</p> 
+ <p>For more usage, look at our generic <a class="externalLink" 
href="https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/trace/TraceReader.java";>TraceReader</a>
 which can programatically read a number of traces from the tracing results 
table.</p> 
+</div>
+                       </div>
+               </div>
+       </div>
+       </div>
+
+       </div><!-- /container -->
+       
+       <!-- Footer
+       ================================================== -->
+       <footer class="well">
+               <div class="container">
+                       <div class="row">
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">About</li>
+                                               <li >
+                                                       <a href="index.html" 
title="Overview">Overview</a>
+                                               </li>
+                                               <li >
+                                                       <a href="recent.html" 
title="New Features">New Features</a>
+                                               </li>
+                                               <li >
+                                                       <a href="roadmap.html" 
title="Roadmap">Roadmap</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="performance.html" title="Performance">Performance</a>
+                                               </li>
+                                               <li >
+                                                       <a href="team.html" 
title="Team">Team</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="contributing.html" title="Contributing">Contributing</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="resources.html" title="Resources">Resources</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="mailing_list.html" title="Mailing Lists">Mailing Lists</a>
+                                               </li>
+                                               <li >
+                                                       <a href="source.html" 
title="Source Repository">Source Repository</a>
+                                               </li>
+                                               <li >
+                                                       <a href="issues.html" 
title="Issue Tracking">Issue Tracking</a>
+                                               </li>
+                                               <li >
+                                                       <a href="download.html" 
title="Download">Download</a>
+                                               </li>
+                                               <li >
+                                                       <a href="http:divider" 
title=""></a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="http://www.apache.org/licenses/"; title="License" 
class="externalLink">License</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="http://www.apache.org/foundation/sponsorship.html"; title="Sponsorship" 
class="externalLink">Sponsorship</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="http://www.apache.org/foundation/thanks.html"; title="Thanks" 
class="externalLink">Thanks</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="http://www.apache.org/security/"; title="Security" 
class="externalLink">Security</a>
+                                               </li>
+                                       </ul>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Using</li>
+                                               <li >
+                                                       <a href="faq.html" 
title="F.A.Q.">F.A.Q.</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="Phoenix-in-15-minutes-or-less.html" title="Quick Start">Quick Start</a>
+                                               </li>
+                                               <li >
+                                                       <a href="building.html" 
title="Building">Building</a>
+                                               </li>
+                                               <li >
+                                                       <a href="tuning.html" 
title="Tuning">Tuning</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="upgrade_from_2_2.html" title="Upgrade from 2.2">Upgrade from 2.2</a>
+                                               </li>
+                                               <li >
+                                                       <a href="http:divider" 
title=""></a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="secondary_indexing.html" title="Secondary Indexes">Secondary Indexes</a>
+                                               </li>
+                                               <li >
+                                                       <a href="joins.html" 
title="Joins">Joins</a>
+                                               </li>
+                                               <li >
+                                                       <a href="views.html" 
title="Views">Views</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="multi-tenancy.html" title="Multi tenancy">Multi tenancy</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="sequences.html" title="Sequences">Sequences</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="array_type.html" title="ARRAY type">ARRAY type</a>
+                                               </li>
+                                               <li >
+                                                       <a href="salted.html" 
title="Salted Tables">Salted Tables</a>
+                                               </li>
+                                               <li >
+                                                       <a href="paged.html" 
title="Paged Queries">Paged Queries</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="skip_scan.html" title="Skip Scan">Skip Scan</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a>
+                                               </li>
+                                               <li class="active">
+                                                       <a href="#" 
title="Request Tracing">Request Tracing</a>
+                                               </li>
+                                               <li >
+                                                       <a href="http:divider" 
title=""></a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR Support</a>
+                                               </li>
+                                               <li >
+                                                       <a href="flume.html" 
title="Apache Flume Plugin">Apache Flume Plugin</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="pig_integration.html" title="Apache Pig Integration">Apache Pig 
Integration</a>
+                                               </li>
+                                       </ul>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Reference</li>
+                                               <li >
+                                                       <a 
href="language/index.html" title="Grammar">Grammar</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="language/functions.html" title="Functions">Functions</a>
+                                               </li>
+                                               <li >
+                                                       <a 
href="language/datatypes.html" title="Datatypes">Datatypes</a>
+                                               </li>
+                                       </ul>
+                               </div>
+                               <div class="span3 bottom-description">
+                                       <form 
action="https://www.google.com/search"; method="get"><input 
value="phoenix.incubator.apache.org" name="sitesearch" type="hidden"><input 
placeholder="Search the site&hellip;" required="required" style="width:170px;" 
size="18" name="q" id="query" type="search"></form>
+                               </div>
+                       </div>
+               </div>
+       </footer>
+               
+       <div class="container subfooter">
+               <div class="row">
+                       <div class="span12">
+                               <p class="pull-right"><a href="#">Back to 
top</a></p>
+                               <p class="copyright">Copyright &copy;2014 <a 
href="http://www.apache.org";>Apache Software Foundation</a>. All Rights 
Reserved.</p>
+                       </div>
+               </div>
+       </div>
+
+       <!-- Le javascript
+       ================================================== -->
+       <!-- Placed at the end of the document so the pages load faster -->
+       <script 
src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js";></script>
+       
+       <script 
src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js";></script>
+       <script src="./js/lightbox.js"></script>
+       <script src="./js/jquery.smooth-scroll.min.js"></script>
+       <!-- back button support for smooth scroll -->
+       <script src="./js/jquery.ba-bbq.min.js"></script>
+       <script 
src="http://yandex.st/highlightjs/7.5/highlight.min.js";></script>
+
+       <script src="./js/reflow-skin.js"></script>
+       
+       </body>
+</html>

Modified: phoenix/site/publish/tuning.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/tuning.html?rev=1618075&r1=1618074&r2=1618075&view=diff
==============================================================================
--- phoenix/site/publish/tuning.html (original)
+++ phoenix/site/publish/tuning.html Thu Aug 14 22:21:43 2014
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2014-06-05
+ Generated by Apache Maven Doxia at 2014-08-14
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -88,6 +88,7 @@
                                                                        <li ><a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a></li>
                                                                        <li ><a 
href="skip_scan.html" title="Skip Scan">Skip Scan</a></li>
                                                                        <li ><a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a></li>
+                                                                       <li ><a 
href="tracing.html" title="Request Tracing">Request Tracing</a></li>
                                                                        <li 
class="divider"/>
                                                                        <li ><a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR 
Support</a></li>
                                                                        <li ><a 
href="flume.html" title="Apache Flume Plugin">Apache Flume Plugin</a></li>
@@ -526,6 +527,9 @@
                                                        <a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a>
                                                </li>
                                                <li >
+                                                       <a href="tracing.html" 
title="Request Tracing">Request Tracing</a>
+                                               </li>
+                                               <li >
                                                        <a href="http:divider" 
title=""></a>
                                                </li>
                                                <li >

Modified: phoenix/site/publish/upgrade_from_2_2.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/upgrade_from_2_2.html?rev=1618075&r1=1618074&r2=1618075&view=diff
==============================================================================
--- phoenix/site/publish/upgrade_from_2_2.html (original)
+++ phoenix/site/publish/upgrade_from_2_2.html Thu Aug 14 22:21:43 2014
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2014-06-03
+ Generated by Apache Maven Doxia at 2014-08-14
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -88,6 +88,7 @@
                                                                        <li ><a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a></li>
                                                                        <li ><a 
href="skip_scan.html" title="Skip Scan">Skip Scan</a></li>
                                                                        <li ><a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a></li>
+                                                                       <li ><a 
href="tracing.html" title="Request Tracing">Request Tracing</a></li>
                                                                        <li 
class="divider"/>
                                                                        <li ><a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR 
Support</a></li>
                                                                        <li ><a 
href="flume.html" title="Apache Flume Plugin">Apache Flume Plugin</a></li>
@@ -274,6 +275,9 @@
                                                        <a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a>
                                                </li>
                                                <li >
+                                                       <a href="tracing.html" 
title="Request Tracing">Request Tracing</a>
+                                               </li>
+                                               <li >
                                                        <a href="http:divider" 
title=""></a>
                                                </li>
                                                <li >

Modified: phoenix/site/publish/views.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/views.html?rev=1618075&r1=1618074&r2=1618075&view=diff
==============================================================================
--- phoenix/site/publish/views.html (original)
+++ phoenix/site/publish/views.html Thu Aug 14 22:21:43 2014
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2014-06-03
+ Generated by Apache Maven Doxia at 2014-08-14
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -88,6 +88,7 @@
                                                                        <li ><a 
href="dynamic_columns.html" title="Dynamic Columns">Dynamic Columns</a></li>
                                                                        <li ><a 
href="skip_scan.html" title="Skip Scan">Skip Scan</a></li>
                                                                        <li ><a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a></li>
+                                                                       <li ><a 
href="tracing.html" title="Request Tracing">Request Tracing</a></li>
                                                                        <li 
class="divider"/>
                                                                        <li ><a 
href="phoenix_on_emr.html" title="Amazon EMR Support">Amazon EMR 
Support</a></li>
                                                                        <li ><a 
href="flume.html" title="Apache Flume Plugin">Apache Flume Plugin</a></li>
@@ -298,6 +299,9 @@ VALUES('John Doe', CURRENT_DATE(), NEXT 
                                                        <a 
href="bulk_dataload.html" title="Bulk Loading">Bulk Loading</a>
                                                </li>
                                                <li >
+                                                       <a href="tracing.html" 
title="Request Tracing">Request Tracing</a>
+                                               </li>
+                                               <li >
                                                        <a href="http:divider" 
title=""></a>
                                                </li>
                                                <li >

Added: phoenix/site/source/src/site/markdown/tracing.md
URL: 
http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/tracing.md?rev=1618075&view=auto
==============================================================================
--- phoenix/site/source/src/site/markdown/tracing.md (added)
+++ phoenix/site/source/src/site/markdown/tracing.md Thu Aug 14 22:21:43 2014
@@ -0,0 +1,99 @@
+# Tracing
+
+As of Phoenix 4.1.0 we have added the ability to collect per-request traces. 
This allows you to see each important step in a query or insertion, all they 
way from the client through into the HBase side, and back again.
+
+We leverage Cloudera's [HTrace](https://github.com/cloudera/htrace) library to 
seamlessly integrate with HBase's tracing utilities. We then take it a step 
further by then depositing these metrics into a Hadoop metrics2 sink that 
writes them into a phoenix table.
+
+**Writing traces to a phoenix table is not supported on Hadoop1**
+
+## Usage
+
+There are only a couple small things you need to do to enable tracing a given 
request with Phoenix.
+
+### Client Property
+
+The frequency of tracing is determined by the client JDBC property:
+
+```
+org.apache.phoenix.trace.frequency
+```
+
+There are three possible tracing frequencies you can use:
+
+1. never 
+    * This is the default
+2. always 
+    * Every request will be traced
+3. probability
+    * take traces with a probabilistic frequency
+    * probability threshold set by: 
"com.salesforce.phoenix.trace.probability.threshold"
+
+By turning one of these properties on, you turn on merely collecting the 
traces. However, the traces need to be deposited somewhere
+
+Example:
+
+```
+# Enable tracing on every request
+Properties props = new Properties();
+props.setProperty("org.apache.phoenix.trace.frequency", "always");
+
+# Or more simply
+org.apache.phoenix.trace.Tracing.setSampling(props, Tracing.Frequency.ALWAYS);
+
+# Enable tracing on 50% of requests
+org.apache.phoenix.trace.Tracing.setSampling(props, Tracing.Frequency.ALWAYS);
+props.setProperty("com.salesforce.phoenix.trace.probability.threshold", .5)
+```
+
+### Enabling Tracing/Metrics2 Sink
+
+This is where the traces are taken from the tracing framework and then 
deposited into a Phoenix table. Because the traces are transported through the 
Hadoop metrics2 framework, you need to add the following configs to your 
hadoop-metrics2.properties (or hadoop-metrics2-phoenix.properties) file on the 
classpath of both the * phoenix client* and *HBase regionservers*, and then 
restart all necessary processes to get them to pick up the configs.
+
+```
+# Hadoop2 metrics sink
+phoenix.sink.*.class=org.apache.phoenix.trace.PhoenixMetricsWriter
+# Writer that generically writes to phoenix tables
+phoenix.sink.writer-class=org.apache.phoenix.trace.PhoenixTableMetricsWriter
+```
+
+## Reading Traces
+
+Once the traces are deposited into the tracing table, by default 
"PHOENIX.TRACING_STATS", but it is configurable in the HBase configuration via:
+
+```
+  <property>
+    <name>rg.apache.phoenix._internal.trace.tablename</name>
+    <value><your custom tracing table name></value>
+  </property>
+```
+
+The tracing table is initialized via the ddl:
+
+```
+"create table if not exists " + table + "( " + 
+  "trace_id bigint not null, " +
+  "parent_id bigint not null, " +
+  "span_id bigint not null, " +
+  "description varchar, " +
+  "star_time bigint, " +
+  "end_time bigint, " +
+  "hostname varchar, " +
+  # column for the number of tags
+  "tags.count smallint, " + 
+  # column for the number of annotations
+  "annotations.count smallint" +
+  "  CONSTRAINT pk PRIMARY KEY (trace_id, parent_id, span_id)"
+```
+
+And contains a number of dynamic columns as each trace, identified by a unique 
trace-id (id of the request), parent-id (id of the parent span) and individual 
span-id (id of the individual segment), may have multiple tags and annotations 
about what happened during the trace. Once you have the number of tags and 
annotations, you can retrieve them the table with a request like:
+
+```
+"SELECT " + columns + " from " 
+  + table + "(" + columns + ") WHERE "
+  + "trace_id=" + traceid + " AND "
+  + "parent_id=" + parent + " AND "
+  + "span_id=" + span
+```
+where columns is either "annotations.aX" or "tags.tX" where 'X' is the index 
of the dynamic column to lookup.
+
+For more usage, look at our generic 
[TraceReader](https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/trace/TraceReader.java)
 which can programatically read a number of traces from the tracing results 
table.

Modified: phoenix/site/source/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/phoenix/site/source/src/site/site.xml?rev=1618075&r1=1618074&r2=1618075&view=diff
==============================================================================
--- phoenix/site/source/src/site/site.xml (original)
+++ phoenix/site/source/src/site/site.xml Thu Aug 14 22:21:43 2014
@@ -89,6 +89,7 @@
             <item href="dynamic_columns.html" name="Dynamic Columns"/>
             <item href="skip_scan.html" name="Skip Scan"/>
             <item href="bulk_dataload.html" name="Bulk Loading"/>
+            <item href="tracing.html" name="Request Tracing"/>
             <item href="http:divider" name=""/>
             <item href="phoenix_on_emr.html" name="Amazon EMR Support"/>
             <item href="flume.html" name="Apache Flume Plugin"/>


Reply via email to