You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2014/05/28 16:59:02 UTC

[04/14] HBASE-11199 One-time effort to pretty-print the Docbook XML, to make further patch review easier (Misty Stanley-Jones)

http://git-wip-us.apache.org/repos/asf/hbase/blob/63e8304e/src/main/docbkx/shell.xml
----------------------------------------------------------------------
diff --git a/src/main/docbkx/shell.xml b/src/main/docbkx/shell.xml
index aaddc8d..deca139 100644
--- a/src/main/docbkx/shell.xml
+++ b/src/main/docbkx/shell.xml
@@ -1,13 +1,15 @@
 <?xml version="1.0"?>
-  <chapter xml:id="shell"
-      version="5.0" xmlns="http://docbook.org/ns/docbook"
-      xmlns:xlink="http://www.w3.org/1999/xlink"
-      xmlns:xi="http://www.w3.org/2001/XInclude"
-      xmlns:svg="http://www.w3.org/2000/svg"
-      xmlns:m="http://www.w3.org/1998/Math/MathML"
-      xmlns:html="http://www.w3.org/1999/xhtml"
-      xmlns:db="http://docbook.org/ns/docbook">
-<!--
+<chapter
+    xml:id="shell"
+    version="5.0"
+    xmlns="http://docbook.org/ns/docbook"
+    xmlns:xlink="http://www.w3.org/1999/xlink"
+    xmlns:xi="http://www.w3.org/2001/XInclude"
+    xmlns:svg="http://www.w3.org/2000/svg"
+    xmlns:m="http://www.w3.org/1998/Math/MathML"
+    xmlns:html="http://www.w3.org/1999/xhtml"
+    xmlns:db="http://docbook.org/ns/docbook">
+    <!--
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -28,54 +30,46 @@
 -->
     <title>The Apache HBase Shell</title>
 
-    <para>
-        The Apache HBase Shell is <link xlink:href="http://jruby.org">(J)Ruby</link>'s
-        IRB with some HBase particular commands added.  Anything you can do in
-        IRB, you should be able to do in the HBase Shell.</para>
-        <para>To run the HBase shell,
-        do as follows:
-        <programlisting>$ ./bin/hbase shell</programlisting>
-        </para>
-            <para>Type <command>help</command> and then <command>&lt;RETURN&gt;</command>
-            to see a listing of shell
-            commands and options. Browse at least the paragraphs at the end of
-            the help emission for the gist of how variables and command
-            arguments are entered into the
-            HBase shell; in particular note how table names, rows, and
-            columns, etc., must be quoted.</para>
-        <para>See <xref linkend="shell_exercises" />
-            for example basic shell operation.
-        </para>
-        <para>Here is a nicely formatted listing of <link xlink:href="http://learnhbase.wordpress.com/2013/03/02/hbase-shell-commands/">all shell commands</link> by Rajeshbabu Chintaguntla.
-        </para>
-
-    <section xml:id="scripting"><title>Scripting</title>
-        <para>For examples scripting Apache HBase, look in the
-            HBase <filename>bin</filename> directory.  Look at the files
-            that end in <filename>*.rb</filename>.  To run one of these
-            files, do as follows:
-            <programlisting>$ ./bin/hbase org.jruby.Main PATH_TO_SCRIPT</programlisting>
-        </para>
+    <para> The Apache HBase Shell is <link
+            xlink:href="http://jruby.org">(J)Ruby</link>'s IRB with some HBase particular commands
+        added. Anything you can do in IRB, you should be able to do in the HBase Shell.</para>
+    <para>To run the HBase shell, do as follows:</para>
+    <programlisting>$ ./bin/hbase shell</programlisting>
+    <para>Type <command>help</command> and then <command>&lt;RETURN&gt;</command> to see a listing
+        of shell commands and options. Browse at least the paragraphs at the end of the help
+        emission for the gist of how variables and command arguments are entered into the HBase
+        shell; in particular note how table names, rows, and columns, etc., must be quoted.</para>
+    <para>See <xref
+            linkend="shell_exercises" /> for example basic shell operation. </para>
+    <para>Here is a nicely formatted listing of <link
+            xlink:href="http://learnhbase.wordpress.com/2013/03/02/hbase-shell-commands/">all shell
+            commands</link> by Rajeshbabu Chintaguntla. </para>
+
+    <section
+        xml:id="scripting">
+        <title>Scripting</title>
+        <para>For examples scripting Apache HBase, look in the HBase <filename>bin</filename>
+            directory. Look at the files that end in <filename>*.rb</filename>. To run one of these
+            files, do as follows:</para>
+        <programlisting>$ ./bin/hbase org.jruby.Main PATH_TO_SCRIPT</programlisting>
     </section>
 
-    <section xml:id="shell_tricks"><title>Shell Tricks</title>
-      <section xml:id="table_variables"><title>Table variables</title>
-
-	<para>
-	  HBase 0.95 adds shell commands that provide a jruby-style
-	  object-oriented references for tables.  Previously all of
-	  the shell commands that act upon a table have a procedural
-	  style that always took the name of the table as an
-	  argument. HBase 0.95 introduces the ability to assign a
-	  table to a jruby variable.  The table reference can be used
-	  to perform data read write operations such as puts, scans,
-	  and gets well as admin functionality such as disabling,
-	  dropping, describing tables.
-	</para>
-	
-	<para>
-	  For example, previously you would always specify a table name:
-	  <programlisting>
+    <section
+        xml:id="shell_tricks">
+        <title>Shell Tricks</title>
+        <section
+            xml:id="table_variables">
+            <title>Table variables</title>
+
+            <para> HBase 0.95 adds shell commands that provide a jruby-style object-oriented
+                references for tables. Previously all of the shell commands that act upon a table
+                have a procedural style that always took the name of the table as an argument. HBase
+                0.95 introduces the ability to assign a table to a jruby variable. The table
+                reference can be used to perform data read write operations such as puts, scans, and
+                gets well as admin functionality such as disabling, dropping, describing tables. </para>
+
+            <para> For example, previously you would always specify a table name:</para>
+            <screen>
 hbase(main):000:0> create ‘t’, ‘f’
 0 row(s) in 1.0970 seconds
 hbase(main):001:0> put 't', 'rold', 'f', 'v'
@@ -101,12 +95,11 @@ hbase(main):005:0> drop 't'
 0 row(s) in 23.1670 seconds
 
 hbase(main):006:0> 
-	  </programlisting>
-	</para>
-	
-	<para>
-	  Now you can assign the table to a variable and use the results in jruby shell code.
-	  <programlisting>
+	  </screen>
+
+            <para> Now you can assign the table to a variable and use the results in jruby shell
+                code.</para>
+            <screen>
 hbase(main):007 > t = create 't', 'f'
 0 row(s) in 1.0970 seconds
 
@@ -128,13 +121,11 @@ hbase(main):038:0> t.disable
 0 row(s) in 6.2350 seconds
 hbase(main):039:0> t.drop
 0 row(s) in 0.2340 seconds
-	  </programlisting>
-	</para>
+	  </screen>
 
-	<para>
-	  If the table has already been created, you can assign a
-	  Table to a variable by using the get_table method:
-	  <programlisting>
+            <para> If the table has already been created, you can assign a Table to a variable by
+                using the get_table method:</para>
+            <screen>
 hbase(main):011 > create 't','f'
 0 row(s) in 1.2500 seconds
 
@@ -150,15 +141,12 @@ ROW                                COLUMN+CELL
  r1                                column=f:, timestamp=1378473876949, value=v                                                      
 1 row(s) in 0.0240 seconds
 hbase(main):015:0> 
-	  </programlisting>
-	</para>
-
-	<para>
-	  The list functionality has also been extended so that it
-	  returns a list of table names as strings.  You can then use
-	  jruby to script table operations based on these names.  The
-	  list_snapshots command also acts similarly.
-	  <programlisting>
+	  </screen>
+
+            <para> The list functionality has also been extended so that it returns a list of table
+                names as strings. You can then use jruby to script table operations based on these
+                names. The list_snapshots command also acts similarly.</para>
+            <screen>
 hbase(main):016 > tables = list(‘t.*’)
 TABLE                                                                                                                               
 t                                                                                                                                   
@@ -170,66 +158,66 @@ hbase(main):017:0> tables.map { |t| disable t ; drop  t}
 
 => [nil]
 hbase(main):018:0> 
-            </programlisting>
-          </para>
+            </screen>
         </section>
 
-        <section><title><filename>irbrc</filename></title>
-                <para>Create an <filename>.irbrc</filename> file for yourself in your home
-                directory. Add customizations. A useful one is command history so commands are save
-                across Shell invocations:
-                <programlisting>
-                        $ more .irbrc
-                        require 'irb/ext/save-history'
-                        IRB.conf[:SAVE_HISTORY] = 100
-                        IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"</programlisting>
-                See the <application>ruby</application> documentation of <filename>.irbrc</filename>
-                to learn about other possible configurations. </para>
-        </section>
-        <section><title>LOG data to timestamp</title>
-            <para>
-                To convert the date '08/08/16 20:56:29' from an hbase log into a timestamp, do:
-                <programlisting>
-                    hbase(main):021:0> import java.text.SimpleDateFormat
-                    hbase(main):022:0> import java.text.ParsePosition
-                    hbase(main):023:0> SimpleDateFormat.new("yy/MM/dd HH:mm:ss").parse("08/08/16 20:56:29", ParsePosition.new(0)).getTime() => 1218920189000</programlisting>
-            </para>
-            <para>
-                To go the other direction:
-                <programlisting>
-                    hbase(main):021:0> import java.util.Date
-                    hbase(main):022:0> Date.new(1218920189000).toString() => "Sat Aug 16 20:56:29 UTC 2008"</programlisting>
+        <section>
+            <title><filename>irbrc</filename></title>
+            <para>Create an <filename>.irbrc</filename> file for yourself in your home directory.
+                Add customizations. A useful one is command history so commands are save across
+                Shell invocations:</para>
+            <screen>
+$ more .irbrc
+require 'irb/ext/save-history'
+IRB.conf[:SAVE_HISTORY] = 100
+IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"</screen>
+            <para>See the <application>ruby</application> documentation of
+                    <filename>.irbrc</filename> to learn about other possible configurations.
             </para>
-            <para>
-                To output in a format that is exactly like that of the HBase log format will take a little messing with
-                <link xlink:href="http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat</link>.
+        </section>
+        <section>
+            <title>LOG data to timestamp</title>
+            <para> To convert the date '08/08/16 20:56:29' from an hbase log into a timestamp,
+                do:</para>
+            <screen>
+hbase(main):021:0> import java.text.SimpleDateFormat
+hbase(main):022:0> import java.text.ParsePosition
+hbase(main):023:0> SimpleDateFormat.new("yy/MM/dd HH:mm:ss").parse("08/08/16 20:56:29", ParsePosition.new(0)).getTime() => 1218920189000</screen>
+            <para> To go the other direction:</para>
+            <screen>
+hbase(main):021:0> import java.util.Date
+hbase(main):022:0> Date.new(1218920189000).toString() => "Sat Aug 16 20:56:29 UTC 2008"</screen>
+            <para> To output in a format that is exactly like that of the HBase log format will take
+                a little messing with <link
+                    xlink:href="http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat</link>.
             </para>
         </section>
-        <section><title>Debug</title>
-            <section><title>Shell debug switch</title>
-                <para>You can set a debug switch in the shell to see more output
-                    -- e.g. more of the stack trace on exception --
-                    when you run a command:
-                    <programlisting>hbase> debug &lt;RETURN&gt;</programlisting>
-                 </para>
+        <section>
+            <title>Debug</title>
+            <section>
+                <title>Shell debug switch</title>
+                <para>You can set a debug switch in the shell to see more output -- e.g. more of the
+                    stack trace on exception -- when you run a command:</para>
+                <programlisting>hbase> debug &lt;RETURN&gt;</programlisting>
             </section>
-            <section><title>DEBUG log level</title>
-                <para>To enable DEBUG level logging in the shell,
-                    launch it with the <command>-d</command> option.
-                    <programlisting>$ ./bin/hbase shell -d</programlisting>
-               </para>
+            <section>
+                <title>DEBUG log level</title>
+                <para>To enable DEBUG level logging in the shell, launch it with the
+                        <command>-d</command> option.</para>
+                <programlisting>$ ./bin/hbase shell -d</programlisting>
             </section>
-         </section>
-        <section><title>Commands</title>
-            <section><title>count</title>
-                <para>Count command returns the number of rows in a table.
-		    It's quite fast when configured with the right CACHE
-            <programlisting>hbase> count '&lt;tablename&gt;', CACHE => 1000</programlisting>
-            The above count fetches 1000 rows at a time.  Set CACHE lower if your rows are big.
-            Default is to fetch one row at a time.
-                 </para>
+        </section>
+        <section>
+            <title>Commands</title>
+            <section>
+                <title>count</title>
+                <para>Count command returns the number of rows in a table. It's quite fast when
+                    configured with the right CACHE
+                    <programlisting>hbase> count '&lt;tablename&gt;', CACHE => 1000</programlisting>
+                    The above count fetches 1000 rows at a time. Set CACHE lower if your rows are
+                    big. Default is to fetch one row at a time. </para>
             </section>
-         </section>
+        </section>
 
     </section>
-  </chapter>
+</chapter>

http://git-wip-us.apache.org/repos/asf/hbase/blob/63e8304e/src/main/docbkx/tracing.xml
----------------------------------------------------------------------
diff --git a/src/main/docbkx/tracing.xml b/src/main/docbkx/tracing.xml
index cdece20..220cc79 100644
--- a/src/main/docbkx/tracing.xml
+++ b/src/main/docbkx/tracing.xml
@@ -1,12 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<appendix xml:id="tracing"
-      version="5.0" xmlns="http://docbook.org/ns/docbook"
-      xmlns:xlink="http://www.w3.org/1999/xlink"
-      xmlns:xi="http://www.w3.org/2001/XInclude"
-      xmlns:svg="http://www.w3.org/2000/svg"
-      xmlns:m="http://www.w3.org/1998/Math/MathML"
-      xmlns:html="http://www.w3.org/1999/xhtml"
-      xmlns:db="http://docbook.org/ns/docbook">
+<appendix
+  xml:id="tracing"
+  version="5.0"
+  xmlns="http://docbook.org/ns/docbook"
+  xmlns:xlink="http://www.w3.org/1999/xlink"
+  xmlns:xi="http://www.w3.org/2001/XInclude"
+  xmlns:svg="http://www.w3.org/2000/svg"
+  xmlns:m="http://www.w3.org/1998/Math/MathML"
+  xmlns:html="http://www.w3.org/1999/xhtml"
+  xmlns:db="http://docbook.org/ns/docbook">
   <!--/**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -28,193 +30,158 @@
   <title>Enabling Dapper-like Tracing in HBase</title>
 
   <para>
-    <link xlink:href="https://issues.apache.org/jira/browse/HBASE-6449">HBASE-6449</link>
-    added support for tracing requests through HBase, using the open source tracing library,
-    <link xlink:href="http://github.com/cloudera/htrace">HTrace</link>.
-    Setting up tracing is quite simple,
-    however it currently requires some very minor changes to your client code
-    (it would not be very difficult to remove this requirement).
-  </para>
+    <link
+      xlink:href="https://issues.apache.org/jira/browse/HBASE-6449">HBASE-6449</link> added support
+    for tracing requests through HBase, using the open source tracing library, <link
+      xlink:href="http://github.com/cloudera/htrace">HTrace</link>. Setting up tracing is quite
+    simple, however it currently requires some very minor changes to your client code (it would not
+    be very difficult to remove this requirement). </para>
 
-  <section xml:id="tracing.spanreceivers">
+  <section
+    xml:id="tracing.spanreceivers">
     <title>SpanReceivers</title>
-    <para>
-      The tracing system works by collecting information in structs called 'Spans'.
-      It is up to you to choose how you want to receive this information
-      by implementing the <classname>SpanReceiver</classname> interface,
-      which defines one method:
-<programlisting><![CDATA[
-  public void receiveSpan(Span span);
+    <para> The tracing system works by collecting information in structs called 'Spans'. It is up to
+      you to choose how you want to receive this information by implementing the
+        <classname>SpanReceiver</classname> interface, which defines one method: </para>
+    <programlisting><![CDATA[
+public void receiveSpan(Span span);
 ]]></programlisting>
-      This method serves as a callback whenever a span is completed.
-      HTrace allows you to use as many SpanReceivers as you want
-      so you can easily send trace information to multiple destinations.
-    </para>
+    <para>This method serves as a callback whenever a span is completed. HTrace allows you to use as
+      many SpanReceivers as you want so you can easily send trace information to multiple
+      destinations. </para>
 
-    <para>
-      Configure what SpanReceivers you'd like to us
-      by putting a comma separated list of the
-      fully-qualified class name of classes implementing
-      <classname>SpanReceiver</classname> in <filename>hbase-site.xml</filename>
-      property: <varname>hbase.trace.spanreceiver.classes</varname>.
-    </para>
+    <para> Configure what SpanReceivers you'd like to us by putting a comma separated list of the
+      fully-qualified class name of classes implementing <classname>SpanReceiver</classname> in
+        <filename>hbase-site.xml</filename> property:
+        <varname>hbase.trace.spanreceiver.classes</varname>. </para>
 
-    <para>
-      HTrace includes a <classname>LocalFileSpanReceiver</classname>
-      that writes all span information to local files in a JSON-based format.
-      The <classname>LocalFileSpanReceiver</classname>
-      looks in <filename>hbase-site.xml</filename>
-      for a <varname>hbase.local-file-span-receiver.path</varname>
-      property with a value describing the name of the file
-      to which nodes should write their span information.
-<programlisting><![CDATA[
-  <property>
-    <name>hbase.trace.spanreceiver.classes</name>
-    <value>org.htrace.impl.LocalFileSpanReceiver</value>
-  </property>
-  <property>
-    <name>hbase.local-file-span-receiver.path</name>
-    <value>/var/log/hbase/htrace.out</value>
-  </property>
+    <para> HTrace includes a <classname>LocalFileSpanReceiver</classname> that writes all span
+      information to local files in a JSON-based format. The
+        <classname>LocalFileSpanReceiver</classname> looks in <filename>hbase-site.xml</filename>
+      for a <varname>hbase.local-file-span-receiver.path</varname> property with a value describing
+      the name of the file to which nodes should write their span information. </para>
+    <programlisting><![CDATA[
+<property>
+  <name>hbase.trace.spanreceiver.classes</name>
+  <value>org.htrace.impl.LocalFileSpanReceiver</value>
+</property>
+<property>
+  <name>hbase.local-file-span-receiver.path</name>
+  <value>/var/log/hbase/htrace.out</value>
+</property>
 ]]></programlisting>
-    </para>
 
+    <para> HTrace also provides <classname>ZipkinSpanReceiver</classname> which converts spans to <link
+        xlink:href="http://github.com/twitter/zipkin">Zipkin</link> span format and send them to
+      Zipkin server. In order to use this span receiver, you need to install the jar of
+      htrace-zipkin to your HBase's classpath on all of the nodes in your cluster. </para>
     <para>
-      HTrace also provides <classname>ZipkinSpanReceiver</classname>
-      which converts spans to
-      <link xlink:href="http://github.com/twitter/zipkin">Zipkin</link>
-      span format and send them to Zipkin server.
-      In order to use this span receiver,
-      you need to install the jar of htrace-zipkin to your HBase's classpath
-      on all of the nodes in your cluster.
-      </para>
-     <para>
-      <filename>htrace-zipkin</filename> is published to the maven central repository.
-      You could get the latest version from there or just build it locally and then
-      copy it out to all nodes, change your config to use zipkin receiver, distribute
-      the new configuration and then (rolling) restart.
-      </para>
-      <para>
-      Here is the example of manual setup procedure.
-<programlisting><![CDATA[
-  $ git clone https://github.com/cloudera/htrace
-  $ cd htrace/htrace-zipkin
-  $ mvn compile assembly:single
-  $ cp target/htrace-zipkin-*-jar-with-dependencies.jar $HBASE_HOME/lib/
-    # copy jar to all nodes...
-]]></programlisting>
-      The <classname>ZipkinSpanReceiver</classname>
-      looks in <filename>hbase-site.xml</filename>
-      for a <varname>hbase.zipkin.collector-hostname</varname>
-      and <varname>hbase.zipkin.collector-port</varname>
-      property with a value describing the Zipkin collector server
-      to which span information are sent.
-<programlisting><![CDATA[
-  <property>
-    <name>hbase.trace.spanreceiver.classes</name>
-    <value>org.htrace.impl.ZipkinSpanReceiver</value>
-  </property> 
-  <property>
-    <name>hbase.zipkin.collector-hostname</name>
-    <value>localhost</value>
-  </property> 
-  <property>
-    <name>hbase.zipkin.collector-port</name>
-    <value>9410</value>
-  </property> 
+      <filename>htrace-zipkin</filename> is published to the maven central repository. You could get
+      the latest version from there or just build it locally and then copy it out to all nodes,
+      change your config to use zipkin receiver, distribute the new configuration and then (rolling)
+      restart. </para>
+    <para> Here is the example of manual setup procedure. </para>
+    <screen><![CDATA[
+$ git clone https://github.com/cloudera/htrace
+$ cd htrace/htrace-zipkin
+$ mvn compile assembly:single
+$ cp target/htrace-zipkin-*-jar-with-dependencies.jar $HBASE_HOME/lib/
+  # copy jar to all nodes...
+]]></screen>
+    <para>The <classname>ZipkinSpanReceiver</classname> looks in <filename>hbase-site.xml</filename>
+      for a <varname>hbase.zipkin.collector-hostname</varname> and
+        <varname>hbase.zipkin.collector-port</varname> property with a value describing the Zipkin
+      collector server to which span information are sent. </para>
+    <programlisting><![CDATA[
+<property>
+  <name>hbase.trace.spanreceiver.classes</name>
+  <value>org.htrace.impl.ZipkinSpanReceiver</value>
+</property> 
+<property>
+  <name>hbase.zipkin.collector-hostname</name>
+  <value>localhost</value>
+</property> 
+<property>
+  <name>hbase.zipkin.collector-port</name>
+  <value>9410</value>
+</property> 
 ]]></programlisting>
-    </para>
 
-    <para>
-      If you do not want to use the included span receivers,
-      you are encouraged to write your own receiver
-      (take a look at <classname>LocalFileSpanReceiver</classname> for an example).
-      If you think others would benefit from your receiver,
-      file a JIRA or send a pull request to
-      <link xlink:href="http://github.com/cloudera/htrace">HTrace</link>.
-    </para>
+    <para> If you do not want to use the included span receivers, you are encouraged to write your
+      own receiver (take a look at <classname>LocalFileSpanReceiver</classname> for an example). If
+      you think others would benefit from your receiver, file a JIRA or send a pull request to <link
+        xlink:href="http://github.com/cloudera/htrace">HTrace</link>. </para>
   </section>
 
-  <section xml:id="tracing.client.modifications">
+  <section
+    xml:id="tracing.client.modifications">
     <title>Client Modifications</title>
-    <para>
-      In order to turn on tracing in your client code,
-      you must initialize the module sending spans to receiver
-      once per client process.
-<programlisting><![CDATA[
-  private SpanReceiverHost spanReceiverHost;
-  
-  ...
-  
-    Configuration conf = HBaseConfiguration.create();
-    SpanReceiverHost spanReceiverHost = SpanReceiverHost.getInstance(conf);
+    <para> In order to turn on tracing in your client code, you must initialize the module sending
+      spans to receiver once per client process. </para>
+    <programlisting><![CDATA[
+private SpanReceiverHost spanReceiverHost;
+
+...
+
+  Configuration conf = HBaseConfiguration.create();
+  SpanReceiverHost spanReceiverHost = SpanReceiverHost.getInstance(conf);
+]]></programlisting>
+    <para>Then you simply start tracing span before requests you think are interesting, and close it
+      when the request is done. For example, if you wanted to trace all of your get operations, you
+      change this: </para>
+    <programlisting><![CDATA[
+HTable table = new HTable(conf, "t1");
+Get get = new Get(Bytes.toBytes("r1"));
+Result res = table.get(get);
 ]]></programlisting>
-      Then you simply start tracing span before requests you think are interesting,
-      and close it when the request is done.
-      For example, if you wanted to trace all of your get operations,
-      you change this:
-<programlisting><![CDATA[
+    <para>into: </para>
+    <programlisting><![CDATA[
+TraceScope ts = Trace.startSpan("Gets", Sampler.ALWAYS);
+try {
   HTable table = new HTable(conf, "t1");
   Get get = new Get(Bytes.toBytes("r1"));
   Result res = table.get(get);
+} finally {
+  ts.close();
+}
 ]]></programlisting>
-      into:
-<programlisting><![CDATA[
-  TraceScope ts = Trace.startSpan("Gets", Sampler.ALWAYS);
-  try {
-    HTable table = new HTable(conf, "t1");
-    Get get = new Get(Bytes.toBytes("r1"));
-    Result res = table.get(get);
-  } finally {
-    ts.close();
-  }
+    <para>If you wanted to trace half of your 'get' operations, you would pass in: </para>
+    <programlisting><![CDATA[
+new ProbabilitySampler(0.5)
 ]]></programlisting>
-      If you wanted to trace half of your 'get' operations, you would pass in:
-<programlisting><![CDATA[
-  new ProbabilitySampler(0.5)
-]]></programlisting>
-      in lieu of <varname>Sampler.ALWAYS</varname>
-      to <classname>Trace.startSpan()</classname>.
-      See the HTrace <filename>README</filename> for more information on Samplers.
-    </para>
+    <para>in lieu of <varname>Sampler.ALWAYS</varname> to <classname>Trace.startSpan()</classname>.
+      See the HTrace <filename>README</filename> for more information on Samplers. </para>
   </section>
 
-  <section xml:id="tracing.client.shell">
+  <section
+    xml:id="tracing.client.shell">
     <title>Tracing from HBase Shell</title>
-    <para>
-      You can use <command>trace</command> command
-      for tracing requests from HBase Shell.
-      <command>trace 'start'</command> command turns on tracing and 
-      <command>trace 'stop'</command> command turns off tracing.
-<programlisting><![CDATA[
-  hbase(main):001:0> trace 'start'
-  hbase(main):002:0> put 'test', 'row1', 'f:', 'val1'   # traced commands
-  hbase(main):003:0> trace 'stop'
+    <para> You can use <command>trace</command> command for tracing requests from HBase Shell.
+        <command>trace 'start'</command> command turns on tracing and <command>trace
+        'stop'</command> command turns off tracing. </para>
+    <programlisting><![CDATA[
+hbase(main):001:0> trace 'start'
+hbase(main):002:0> put 'test', 'row1', 'f:', 'val1'   # traced commands
+hbase(main):003:0> trace 'stop'
 ]]></programlisting>
-    </para>
     <para>
-      <command>trace 'start'</command> and 
-      <command>trace 'stop'</command> always
-      returns boolean value representing 
-      if or not there is ongoing tracing.
-      As a result, <command>trace 'stop'</command>
-      returns false on suceess.
-      <command>trace 'status'</command>
-      just returns if or not tracing is turned on.
-<programlisting><![CDATA[
-  hbase(main):001:0> trace 'start'
-  => true
-  
-  hbase(main):002:0> trace 'status'
-  => true
-  
-  hbase(main):003:0> trace 'stop'
-  => false
-  
-  hbase(main):004:0> trace 'status'
-  => false
+      <command>trace 'start'</command> and <command>trace 'stop'</command> always returns boolean
+      value representing if or not there is ongoing tracing. As a result, <command>trace
+        'stop'</command> returns false on suceess. <command>trace 'status'</command> just returns if
+      or not tracing is turned on. </para>
+    <programlisting><![CDATA[
+hbase(main):001:0> trace 'start'
+=> true
+
+hbase(main):002:0> trace 'status'
+=> true
+
+hbase(main):003:0> trace 'stop'
+=> false
+
+hbase(main):004:0> trace 'status'
+=> false
 ]]></programlisting>
-    </para>
   </section>
 
 </appendix>