Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Pig Wiki" for change 
notification.

The following page has been changed by CorinneC:
http://wiki.apache.org/pig/PigTutorial

------------------------------------------------------------------------------
  
  (''page in progress ...'')
  
- 
- == Pig Tutorials ==
  The Pig tutorial shows you how to run Pig scripts in local mode or on a 
Hadoop cluster.
  
   * To run the scripts in local mode, no Hadoop or DFS installation is 
required. All files are installed and run from your local host and file system.
   * To run the scripts on a Hadoop cluster, you need access to a Hadoop 
cluster and DFS installation.
  
- The Pig JAR file (pig.jar) and the Pig tutorial file (*.gz) include 
everything you need to get started.
+ The Pig JAR file (pig.jar) and the Pig tutorial file (*.gz) include 
everything you need to get started. Follow these three basic steps:
  
+  1. Install Java (if necessary).
+  1. Install Pig.
+  1. Install and run the Pig scripts (in local mode or on a Hadoop cluster).
+ 
- === Java Installation ===
+ == Java Installation ==
+ Your run-time environment should include '''Java 1.5'''. Set the JAVA_HOME 
environment variable to the root of your Java installation. 
- Your run-time environment should include '''Java 1.5'''.
-  
- Set the JAVA_HOME environment variable to the root of your Java installation. 
  
  
- === Pig Installation ===
+ == Pig Installation ==
  To install Pig, do the following:
  
   1. Download the Pig JAR file (pig.jar) and move it to the appropriate 
directory. For example:  /home/me/pig. 
   1. Define an environment variable with the location of the Pig JAR file. For 
example: export PIGDIR=/home/me/pig (bash, sh) or setenv PIGDIR /home/me/pig 
(tcsh, csh).
  
  
- === Pig Scripts and Local Mode ===
+ == Pig Scripts - Local Mode ==
  To install and run the Pig scripts in local mode, do the following:
  
-  1. Download and unzip the Pig tutorial file (*.gz) to your local directory 
(the Pig tutorial files are described below).
+  1. Download and unzip the Pig tutorial file (*.gz) to your local directory 
(the Pig tutorial file is described below).
   1. Execute the following command (using either tutorial-local.pig or 
tutorial-join-local.pig)
  {{{
  $ java -cp $PIGDIR/pig.jar org.apache.pig.Main -x local tutorial-local.pig
@@ -41, +41 @@

  }}}
  
  
- === Pig Scripts and Hadoop Cluster ===
+ == Pig Scripts - Hadoop Cluster ==
  To install and run the Pig scripts on a Hadoop cluster, do the following:
  
-  1. Download and unzip the Pig tutorial file (*.gz) to your local directory 
(the Pig tutorial files are described below).
+  1. Download and unzip the Pig tutorial file (*.gz) to your local directory 
(the Pig tutorial file is described below).
   1. Copy the exite.log file to your DFS directory.
  {{{
  $ hadoop dfs –copyFromLocal tutorial/excite.log .
@@ -59, +59 @@

  $ hadoop dfs -ls ngrams.txt
  }}}
  
- === Pig Tutorial Files ===
+ == Pig Tutorial File ==
- The Pig tutorial files are described here.
+ The contents of the Pig tutorial file (*.gz) are described here.
  || '''File''' || '''Description'''||
  || tutorial.jar|| User-defined functions (UDFs) ||
  || tutorial.pig || Tutorial-1 (run on Hadoop) ||

Reply via email to