Author: jamestaylor
Date: Sun Aug 17 04:09:36 2014
New Revision: 1618453

URL: http://svn.apache.org/r1618453
Log:
Update Tracing docs

Modified:
    phoenix/phoenix-docs/src/main/org/h2/Driver.java
    phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcCallableStatement.java
    phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcConnection.java
    phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java
    phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcResultSet.java
    phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcStatement.java
    phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcConnectionPool.java
    phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcDataSource.java
    phoenix/phoenix-docs/src/main/org/h2/tools/SimpleResultSet.java
    phoenix/site/publish/tracing.html
    phoenix/site/source/src/site/markdown/tracing.md

Modified: phoenix/phoenix-docs/src/main/org/h2/Driver.java
URL: 
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/Driver.java?rev=1618453&r1=1618452&r2=1618453&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/Driver.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/Driver.java Sun Aug 17 04:09:36 2014
@@ -17,7 +17,7 @@ import org.h2.message.DbException;
 import org.h2.message.TraceSystem;
 import org.h2.upgrade.DbUpgrade;
 
-//## Java 1.7 ##
+/*## Java 1.7 ##
 import java.util.logging.Logger;
 //*/
 
@@ -138,7 +138,7 @@ public class Driver implements java.sql.
     /**
      * [Not supported]
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public Logger getParentLogger() {
         return null;
     }

Modified: phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcCallableStatement.java
URL: 
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcCallableStatement.java?rev=1618453&r1=1618452&r2=1618453&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcCallableStatement.java 
(original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcCallableStatement.java Sun 
Aug 17 04:09:36 2014
@@ -1440,7 +1440,7 @@ public class JdbcCallableStatement exten
      * @param parameterIndex the parameter index (1, 2, ...)
      * @param type the class of the returned value
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public <T> T getObject(int parameterIndex, Class<T> type) {
         return null;
     }
@@ -1452,7 +1452,7 @@ public class JdbcCallableStatement exten
      * @param parameterName the parameter name
      * @param type the class of the returned value
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public <T> T getObject(String parameterName, Class<T> type) {
         return null;
     }

Modified: phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcConnection.java
URL: 
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcConnection.java?rev=1618453&r1=1618452&r2=1618453&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcConnection.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcConnection.java Sun Aug 17 
04:09:36 2014
@@ -49,7 +49,7 @@ import java.sql.SQLXML;
 import java.sql.SQLClientInfoException;
 //*/
 
-//## Java 1.7 ##
+/*## Java 1.7 ##
 import java.util.concurrent.Executor;
 //*/
 
@@ -1678,7 +1678,7 @@ public class JdbcConnection extends Trac
      *
      * @param schema the schema
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public void setSchema(String schema) {
         // not supported
     }
@@ -1687,7 +1687,7 @@ public class JdbcConnection extends Trac
     /**
      * [Not supported]
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public String getSchema() {
         return null;
     }
@@ -1698,7 +1698,7 @@ public class JdbcConnection extends Trac
      *
      * @param executor the executor used by this method
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public void abort(Executor executor) {
         // not supported
     }
@@ -1710,7 +1710,7 @@ public class JdbcConnection extends Trac
      * @param executor the executor used by this method
      * @param milliseconds the TCP connection timeout
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public void setNetworkTimeout(Executor executor, int milliseconds) {
         // not supported
     }
@@ -1719,7 +1719,7 @@ public class JdbcConnection extends Trac
     /**
      * [Not supported]
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public int getNetworkTimeout() {
         return 0;
     }

Modified: phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java
URL: 
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java?rev=1618453&r1=1618452&r2=1618453&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java 
(original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java Sun Aug 
17 04:09:36 2014
@@ -2885,7 +2885,7 @@ public class JdbcDatabaseMetaData extend
     /**
      * [Not supported]
      */
-    //## Java 1.7 ##
+    /*## Java 1.7 ##
     public boolean generatedKeyAlwaysReturned() {
         return true;
     }
@@ -2902,7 +2902,7 @@ public class JdbcDatabaseMetaData extend
      * @param columnNamePattern null (to get all objects) or a column name
      *            (uppercase for unquoted names)
      */
-    //## Java 1.7 ##
+    /*## Java 1.7 ##
     public ResultSet getPseudoColumns(String catalog, String schemaPattern,
             String tableNamePattern, String columnNamePattern) {
         return null;

Modified: phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcResultSet.java
URL: 
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcResultSet.java?rev=1618453&r1=1618452&r2=1618453&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcResultSet.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcResultSet.java Sun Aug 17 
04:09:36 2014
@@ -3431,7 +3431,7 @@ public class JdbcResultSet extends Trace
      * @param columnIndex the column index (1, 2, ...)
      * @param type the class of the returned value
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public <T> T getObject(int columnIndex, Class<T> type) {
         return null;
     }
@@ -3443,7 +3443,7 @@ public class JdbcResultSet extends Trace
      * @param columnName the column name
      * @param type the class of the returned value
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public <T> T getObject(String columnName, Class<T> type) {
         return null;
     }

Modified: phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcStatement.java
URL: 
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcStatement.java?rev=1618453&r1=1618452&r2=1618453&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcStatement.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcStatement.java Sun Aug 17 
04:09:36 2014
@@ -876,7 +876,7 @@ public class JdbcStatement extends Trace
     /**
      * [Not supported]
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public void closeOnCompletion() {
         // not supported
     }
@@ -885,7 +885,7 @@ public class JdbcStatement extends Trace
     /**
      * [Not supported]
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public boolean isCloseOnCompletion() {
         return true;
     }

Modified: phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcConnectionPool.java
URL: 
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcConnectionPool.java?rev=1618453&r1=1618452&r2=1618453&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcConnectionPool.java 
(original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcConnectionPool.java Sun Aug 
17 04:09:36 2014
@@ -35,7 +35,7 @@ import org.h2.util.New;
 import org.h2.message.DbException;
 //*/
 
-//## Java 1.7 ##
+/*## Java 1.7 ##
 import java.util.logging.Logger;
 //*/
 
@@ -330,7 +330,7 @@ public class JdbcConnectionPool implemen
     /**
      * [Not supported]
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public Logger getParentLogger() {
         return null;
     }

Modified: phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcDataSource.java
URL: 
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcDataSource.java?rev=1618453&r1=1618452&r2=1618453&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcDataSource.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcDataSource.java Sun Aug 17 
04:09:36 2014
@@ -26,7 +26,7 @@ import org.h2.jdbc.JdbcConnection;
 import org.h2.message.TraceObject;
 import org.h2.util.StringUtils;
 
-//## Java 1.7 ##
+/*## Java 1.7 ##
 import java.util.logging.Logger;
 //*/
 
@@ -381,7 +381,7 @@ public class JdbcDataSource extends Trac
     /**
      * [Not supported]
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public Logger getParentLogger() {
         return null;
     }

Modified: phoenix/phoenix-docs/src/main/org/h2/tools/SimpleResultSet.java
URL: 
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/tools/SimpleResultSet.java?rev=1618453&r1=1618452&r2=1618453&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/tools/SimpleResultSet.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/tools/SimpleResultSet.java Sun Aug 17 
04:09:36 2014
@@ -853,7 +853,7 @@ public class SimpleResultSet implements 
      * @param columnIndex the column index (1, 2, ...)
      * @param type the class of the returned value
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public <T> T getObject(int columnIndex, Class<T> type) {
         return null;
     }
@@ -865,7 +865,7 @@ public class SimpleResultSet implements 
      * @param columnName the column name
      * @param type the class of the returned value
      */
-//## Java 1.7 ##
+/*## Java 1.7 ##
     public <T> T getObject(String columnName, Class<T> type) {
         return null;
     }

Modified: phoenix/site/publish/tracing.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/tracing.html?rev=1618453&r1=1618452&r2=1618453&view=diff
==============================================================================
--- phoenix/site/publish/tracing.html (original)
+++ phoenix/site/publish/tracing.html Sun Aug 17 04:09:36 2014
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2014-08-15
+ Generated by Apache Maven Doxia at 2014-08-16
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -134,7 +134,7 @@
   <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>phoenix.trace.frequency
 </pre> 
   </div> 
   <p>There are three possible tracing frequencies you can use:</p> 
@@ -150,7 +150,7 @@
    <li>probability 
     <ul> 
      <li>take traces with a probabilistic frequency</li> 
-     <li>probability threshold set by: 
“com.salesforce.phoenix.trace.probability.threshold”</li> 
+     <li>probability threshold set by: 
“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> 
@@ -158,14 +158,14 @@
   <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;);
+props.setProperty(&quot;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)
+props.setProperty(&quot;phoenix.trace.probability.threshold&quot;, .5)
 </pre> 
   </div> 
  </div> 
@@ -183,38 +183,37 @@ phoenix.sink.writer-class=org.apache.pho
 </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> 
+ <p>Once the traces are deposited into the tracing table, by default 
<tt>PHOENIX.TRACING_STATS</tt>, 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;name&gt;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;
+ <div> 
+  <pre>
+    CREATE TABLE <b>PHOENIX.TRACING_STATS</b> (
+      <b>trace_id</b> BIGINT NOT NULL,
+      <b>parent_id</b> BIGINT NOT NULL,
+      <b>span_id</b> BIGINT NOT NULL,
+      <b>description</b> VARCHAR,
+      <b>start_time</b> BIGINT,
+      <b>end_time</b> BIGINT,
+      <b>hostname</b> VARCHAR,
+      <b>tags.count</b> SMALLINT,
+      <b>annotations.count</b> SMALLINT,
+      CONSTRAINT pk PRIMARY KEY (<b>trace_id, parent_id, span_id</b>)
 </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> 
+ <p>The tracing table also contains a number of dynamic columns for 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>SELECT &lt;columns&gt;
+  FROM PHOENIX.TRACING_STATS
+  WHERE trace_id = ?
+  AND parent_id = ?
+  ANd span_id = ?
 </pre> 
  </div> 
  <p>where columns is either “annotations.aX” or “tags.tX” where 
‘X’ is the index of the dynamic column to lookup.</p> 

Modified: phoenix/site/source/src/site/markdown/tracing.md
URL: 
http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/tracing.md?rev=1618453&r1=1618452&r2=1618453&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/tracing.md (original)
+++ phoenix/site/source/src/site/markdown/tracing.md Sun Aug 17 04:09:36 2014
@@ -15,7 +15,7 @@ There are only a couple small things you
 The frequency of tracing is determined by the client JDBC property:
 
 ```
-org.apache.phoenix.trace.frequency
+phoenix.trace.frequency
 ```
 
 There are three possible tracing frequencies you can use:
@@ -26,7 +26,7 @@ There are three possible tracing frequen
     * Every request will be traced
 3. probability
     * take traces with a probabilistic frequency
-    * probability threshold set by: 
"com.salesforce.phoenix.trace.probability.threshold"
+    * probability threshold set by: "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
 
@@ -35,14 +35,14 @@ Example:
 ```
 # Enable tracing on every request
 Properties props = new Properties();
-props.setProperty("org.apache.phoenix.trace.frequency", "always");
+props.setProperty("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)
+props.setProperty("phoenix.trace.probability.threshold", .5)
 ```
 
 ### Enabling Tracing/Metrics2 Sink
@@ -58,41 +58,39 @@ phoenix.sink.writer-class=org.apache.pho
 
 ## 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:
+Once the traces are deposited into the tracing table, by default 
<code>PHOENIX.TRACING_STATS</code>, but it is configurable in the HBase 
configuration via:
 
 ```
   <property>
-    <name>rg.apache.phoenix._internal.trace.tablename</name>
+    <name>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
+<pre>
+    CREATE TABLE <b>PHOENIX.TRACING_STATS</b> (
+      <b>trace_id</b> BIGINT NOT NULL,
+      <b>parent_id</b> BIGINT NOT NULL,
+      <b>span_id</b> BIGINT NOT NULL,
+      <b>description</b> VARCHAR,
+      <b>start_time</b> BIGINT,
+      <b>end_time</b> BIGINT,
+      <b>hostname</b> VARCHAR,
+      <b>tags.count</b> SMALLINT,
+      <b>annotations.count</b> SMALLINT,
+      CONSTRAINT pk PRIMARY KEY (<b>trace_id, parent_id, span_id</b>)
+</pre>
+
+The tracing table also contains a number of dynamic columns for 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 PHOENIX.TRACING_STATS
+  WHERE trace_id = ?
+  AND parent_id = ?
+  ANd span_id = ?
 ```
 where columns is either "annotations.aX" or "tags.tX" where 'X' is the index 
of the dynamic column to lookup.
 


Reply via email to