You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by gd...@apache.org on 2012/10/08 05:38:12 UTC

svn commit: r1395448 - in /pig/trunk: CHANGES.txt src/docs/src/documentation/content/xdocs/cmds.xml

Author: gdfm
Date: Mon Oct  8 03:38:11 2012
New Revision: 1395448

URL: http://svn.apache.org/viewvc?rev=1395448&view=rev
Log:
PIG-2946: Documentation of "history" and "clear" commands (xalan via azaroth)

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/src/docs/src/documentation/content/xdocs/cmds.xml

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1395448&r1=1395447&r2=1395448&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Mon Oct  8 03:38:11 2012
@@ -25,6 +25,8 @@ PIG-1891 Enable StoreFunc to make intell
 
 IMPROVEMENTS
 
+PIG-2946: Documentation of "history" and "clear" commands (xalan via azaroth)
+
 PIG-2877: Make SchemaTuple work in foreach (and thus, in loads) (jcoveney)
 
 PIG-2923: Lazily register bags with SpillableMemoryManager (dvryaboy)

Modified: pig/trunk/src/docs/src/documentation/content/xdocs/cmds.xml
URL: http://svn.apache.org/viewvc/pig/trunk/src/docs/src/documentation/content/xdocs/cmds.xml?rev=1395448&r1=1395447&r2=1395448&view=diff
==============================================================================
--- pig/trunk/src/docs/src/documentation/content/xdocs/cmds.xml (original)
+++ pig/trunk/src/docs/src/documentation/content/xdocs/cmds.xml Mon Oct  8 03:38:11 2012
@@ -147,8 +147,9 @@ grunt> 
 </source>
    </section>
  
-    </section>
-        </section>
+   </section>
+    
+   </section>
  
  <!-- ======================================================== -->         
         
@@ -156,6 +157,51 @@ grunt> 
    <title>Utility Commands</title>
    
    <!-- +++++++++++++++++++++++++++++++++++++++ -->
+       <section id="clear">
+           <title>clear</title>
+           <p>Clear the screen of Pig grunt shell and position the cursor at top of the screen.</p>
+           
+           <section>
+               <title>Syntax </title>
+               <table>
+                   <tr>
+                       <td>
+                           <p>clear</p>
+                       </td>
+                   </tr> 
+               </table>
+           </section>
+           
+           <section>
+               <title>Terms</title>
+               <table>
+                   <tr>
+                       <td>
+                           <p>key</p>
+                       </td>
+                       <td>
+                           <p>Description.</p>
+                       </td>
+                   </tr>
+                   <tr>
+                       <td>
+                           <p>none</p>
+                       </td>
+                       <td>
+                           <p>no parameters</p>
+                       </td>
+                   </tr> 
+               </table></section>
+           <section>
+               <title>Example</title>
+               <p>In this example the clear command clean up Pig grunt shell.</p>
+               <source>
+grunt&gt; clear</source>
+           </section>
+           
+       </section>
+
+   <!-- +++++++++++++++++++++++++++++++++++++++ -->
   <section id="exec">
    <title>exec</title>
    <p>Run a Pig script.</p>
@@ -312,6 +358,67 @@ The following properties are supported:
    </section>
    
    <!-- +++++++++++++++++++++++++++++++++++++++ -->      
+       <section id="history">
+           <title>history</title>
+           <p>Display the list of statements used so far.</p>
+           
+           <section>
+               <title>Syntax</title>
+               <table>
+                   <tr>
+                       <td>
+                           <p>history [-n]</p>
+                       </td>
+                   </tr> 
+               </table>
+           </section>
+           
+           <section>
+               <title>Terms</title>
+               <table>
+                   <tr>
+                       <td>
+                           <p>key</p>
+                       </td>
+                       <td>
+                           <p>Description.</p>
+                       </td>
+                   </tr>
+                   <tr>
+                       <td>
+                           <p>-n</p>
+                       </td>
+                       <td>
+                           <p>Omit line numbers in the list.</p>
+                       </td>
+                   </tr>
+               </table>
+           </section>
+           
+           <section>
+               <title>Usage</title>
+               <p>The history command shows the statements used so far.</p></section>
+           
+           <section>
+               <title>Example</title>
+               <p>In this example the history command shows all the statements with line numbers and without them.</p>
+               <source>
+grunt&gt; a = LOAD 'student' AS (name, age, gpa);
+grunt&gt; b = order a by name;
+grunt&gt; history
+1 a = LOAD 'student' AS (name, age, gpa);
+2 b = order a by name;
+
+grunt&gt; c = order a by name;
+grunt&gt; history -n
+a = LOAD 'student' AS (name, age, gpa);
+b = order a by name;
+c = order a by name;</source>
+           </section>
+           
+       </section>
+
+   <!-- +++++++++++++++++++++++++++++++++++++++ -->      
    <section id="kill">
    <title>kill</title>
    <p>Kills a job.</p>
@@ -353,7 +460,8 @@ grunt&gt; kill job_0001
 </source>
    </section></section>
    
-   <section>
+   <!-- +++++++++++++++++++++++++++++++++++++++ -->
+   <section id="quit">
    <title>quit</title>
    <p>Quits from the Pig grunt shell.</p>
    
@@ -390,7 +498,8 @@ grunt&gt; kill job_0001
 <source>
 grunt&gt; quit
 </source>
-   </section></section>
+   </section>
+   </section>
    
     <!-- +++++++++++++++++++++++++++++++++++++++ -->     
    <section id="run">