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/RunPig

------------------------------------------------------------------------------
  
  == Run Modes ==
  
- Pig has two run modes or exectypes, local and hadoop (currently called 
mapreduce). To run Pig in local mode, you need access to a single machine. To 
run Pig in hadoop (mapreduce) mode, you need access to a Hadoop cluster.
+ Pig has two run modes or exectypes, local and hadoop (currently called 
mapreduce). 
+   * '''Local Mode''': To run Pig in local mode, you need access to a single 
machine. 
+   * '''Hadoop (mapreduce) Mode''': To run Pig in hadoop (mapreduce) mode, you 
need access to a Hadoop cluster.
  
- To get a listing of all Pig commands, including the run modes, use 
+ To get a listing of all Pig commands, including the run modes, use: 
  {{{
  $ pig –help
  }}}
@@ -62, +64 @@

  
    * The sample code files (XXX.pig and XXX.java) on this page.
  
- == Local Mode ==
+ = Local Mode =
  This section shows you how to run Pig in local mode, using the Grunt shell, a 
Pig script, and an embedded program.
  
  To run Pig in local mode, you only need access to a single machine. 
@@ -70, +72 @@

  === Grunt Shell ===
  To run Pig’s Grunt shell in local mode, follow these instructions.
  
- First, point $PIG_CLASSPATH to the pig.jar file (in your current working 
directory). Example:
+ First, point $PIG_CLASSPATH to the pig.jar file (in your current working 
directory):
  {{{
  $ export PIG_CLASSPATH=./pig.jar
  }}} 
@@ -100, +102 @@

  
  The Grunt shell is invoked and you can enter commands at the prompt.
  
+ === Script File ===
+ 
+ To run a Pig script file in local mode, follow these instructions (which are 
the same as the Grunt Shell instructions above – you just include the script 
file).
  
  
- === Script File ===
+ First, point $PIG_CLASSPATH to the pig.jar file (in your current working 
directory):
+ {{{
+ $ export PIG_CLASSPATH=./pig.jar
+ }}}
+ 
+ (1) With the Pig Script
+ 
+ From your current working directory, run:
+ 
+ {{{ 
+ $ pig -x local XXX.pig
+ }}}
+ 
+ The results are displayed  to your terminal screen.
+ 
+ (2) Without the Pig Script
+ 
+ From your current working directory, run:
+ {{{
+ $ java -cp pig.jar org.apache.pig.Main -x local XXX.pig
+ Or
+ $ java –jar pig.jar –x local XXX.pig
+ }}}
+ 
+ The results are displayed to your terminal screen.
+ 
  
  === Embedded Program ===
  

Reply via email to