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 ------------------------------------------------------------------------------ === Running the Pig Tutorials in Local Mode === To run the Pig tutorial in local mode, do the following: + 1. Download and unzip the Pig tutorial file to your local directory (all files are explained in the next section). 1. Execute the following command (using either tutorial-local.pig or tutorial-join-local.pig) {{{ @@ -35, +36 @@ $ ls -l /tmp/ngrams.txt }}} + + === Running the Pig Tutorials on a Hadoop Cluster === + To run the Pig tutorial on a Hadoop cluster, do the following: + + 1. Download and unzip the Pig tutorial file to your local directory (all files are explained in the next section). + 1. Copy the exite.log file to your DFS directory. + {{{ + $ hadoop dfs âcopyFromLocal tutorial/excite.log . + }}} + 1.#3 Set the HADOOPSITEPATH environment variable to the location of your hadoop-site.xml file. + 1. Execute the following command (using either tutorial.pig or tutorial-join.pig): + {{{ + $ java -cp pig.jar:$HADOOPSITEPATH org.apache.pig.Main tutorial.pig + }}} + 1.#5 Review the results: + {{{ + $ hadoop dfs -ls ngrams.txt + }}} +